File tree Expand file tree Collapse file tree 2 files changed +10
-19
lines changed
packages/powersync_flutter_libs Expand file tree Collapse file tree 2 files changed +10
-19
lines changed Original file line number Diff line number Diff line change @@ -23,23 +23,19 @@ target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}
2323target_link_libraries (${PLUGIN_NAME} PRIVATE flutter)
2424
2525# ----------------------------------------------------------------------
26- # Download and add powersync prebuilt library.
26+ # Add powersync prebuilt library.
2727
2828set (POWERSYNC_VERSION 0.1.6)
29+ set (CORE_FILE_NAME "libpowersync.so" )
2930
3031set (POWERSYNC_ARCH ${CMAKE_SYSTEM_PROCESSOR} )
3132if (${POWERSYNC_ARCH} MATCHES "x86_64" OR ${POWERSYNC_ARCH} MATCHES "AMD64" )
32- set (POWERSYNC_ARCH x64 )
33+ set (CORE_FILE_NAME "libpowersync_x64.so" )
3334elseif (${POWERSYNC_ARCH} MATCHES "^arm64" OR ${POWERSYNC_ARCH} MATCHES "^armv8" )
34- set (POWERSYNC_ARCH aarch64 )
35+ set (CORE_FILE_NAME "libpowersync_aarch64.so" )
3536endif ()
3637
37- set (POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /libpowersync.so" )
38-
39- file (DOWNLOAD
40- "https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v${POWERSYNC_VERSION} /libpowersync_${POWERSYNC_ARCH} .so"
41- ${POWERSYNC_FILE_PATH}
42- )
38+ set (POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /${CORE_FILE_NAME} " )
4339
4440# ----------------------------------------------------------------------
4541
Original file line number Diff line number Diff line change @@ -24,24 +24,19 @@ target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}
2424target_link_libraries (${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin)
2525
2626# ----------------------------------------------------------------------
27- # Download and add powersync prebuilt library.
28-
29- set (POWERSYNC_VERSION 0.1.6)
27+ # Add powersync prebuilt library.
3028
3129set (POWERSYNC_ARCH ${CMAKE_SYSTEM_PROCESSOR} )
30+ set (CORE_FILE_NAME "powersync.dll" )
31+
3232if (${POWERSYNC_ARCH} MATCHES "x86_64" OR ${POWERSYNC_ARCH} MATCHES "AMD64" )
33- set (POWERSYNC_ARCH x64 )
33+ set (CORE_FILE_NAME "powersync.dll" )
3434elseif (${POWERSYNC_ARCH} MATCHES "^arm64" OR ${POWERSYNC_ARCH} MATCHES "^armv8" )
35- set ( POWERSYNC_ARCH aarch64 )
35+ message (FATAL_ERROR "Unsupported architecture: ${ POWERSYNC_ARCH} , please file a GitHub issue to add support." )
3636endif ()
3737
3838set (POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /powersync.dll" )
3939
40- file (DOWNLOAD
41- "https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v${POWERSYNC_VERSION} /powersync_${POWERSYNC_ARCH} .dll"
42- ${POWERSYNC_FILE_PATH}
43- )
44-
4540# ----------------------------------------------------------------------
4641
4742# List of absolute paths to libraries that should be bundled with the plugin.
You can’t perform that action at this time.
0 commit comments