File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,20 +69,21 @@ FetchContent_Declare(
6969 URL https://github.com/objectbox/objectbox-c/releases/download/v${OBJECTBOX_VERSION} /objectbox-windows-${OBJECTBOX_ARCH} .zip
7070)
7171
72- FetchContent_GetProperties (objectbox-download)
73- if (NOT objectbox-download_POPULATED)
74- FetchContent_Populate (objectbox-download)
75- endif ()
72+ # FIXED: Use MakeAvailable instead of GetProperties/Populate
73+ # This handles the download and set-up internally and is the modern standard.
74+ FetchContent_MakeAvailable (objectbox-download)
7675
76+ # We still need the source directory path to point to the library files
77+ # After MakeAvailable, the directory variable is named <lowercaseName>_SOURCE_DIR
7778set (objectbox_flutter_libs_bundled_libraries
7879 "${objectbox-download_SOURCE_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX} objectbox${CMAKE_SHARED_LIBRARY_SUFFIX} "
7980 PARENT_SCOPE
8081)
8182
8283add_library (objectbox SHARED IMPORTED GLOBAL )
8384set_target_properties (objectbox PROPERTIES
84- IMPORTED_LOCATION ${objectbox-download_SOURCE_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX}
85- IMPORTED_IMPLIB ${objectbox-download_SOURCE_DIR}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX}
85+ IMPORTED_LOCATION " ${objectbox-download_SOURCE_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX} objectbox${CMAKE_SHARED_LIBRARY_SUFFIX} "
86+ IMPORTED_IMPLIB " ${objectbox-download_SOURCE_DIR}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX} objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} "
8687)
8788
88- target_link_libraries (${PLUGIN_NAME} PRIVATE objectbox )
89+ target_link_libraries (${PLUGIN_NAME} PRIVATE objectbox )
You can’t perform that action at this time.
0 commit comments