@@ -15,75 +15,3 @@ set(PLUGIN_NAME "amplify_db_common_plugin")
15
15
add_library (${PLUGIN_NAME} SHARED
16
16
"amplify_db_common_plugin.cpp"
17
17
)
18
-
19
- # ##
20
- # Below here, keep in sync with: https://github.com/simolus3/sqlite3.dart/blob/main/sqlite3_flutter_libs/windows/CMakeLists.txt
21
- # ##
22
-
23
- # Apply standard settings for the plugin
24
- apply_standard_settings (${PLUGIN_NAME} )
25
- set_target_properties (${PLUGIN_NAME} PROPERTIES
26
- CXX_VISIBILITY_PRESET hidden )
27
- target_compile_definitions (${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL )
28
- target_include_directories (${PLUGIN_NAME} INTERFACE
29
- "${CMAKE_CURRENT_SOURCE_DIR} /include" )
30
- target_link_libraries (${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin )
31
-
32
- # Check if the target 'sqlite3' already exists
33
- if (NOT TARGET sqlite3_amplify_db_common )
34
- include (FetchContent )
35
-
36
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0" )
37
- FetchContent_Declare (
38
- sqlite3
39
- URL https://sqlite.org/2024/sqlite-autoconf-3460000.tar.gz
40
- DOWNLOAD_EXTRACT_TIMESTAMP NEW
41
- )
42
- else ()
43
- FetchContent_Declare (
44
- sqlite3
45
- URL https://sqlite.org/2024/sqlite-autoconf-3460000.tar.gz
46
- )
47
- endif ()
48
-
49
- FetchContent_MakeAvailable (sqlite3 )
50
-
51
- # Create an alias for the sqlite3 library specifically for amplify_db_common
52
- # Must be preserved to avoid collisions, ie consumer has a dependency on sqlite3 too
53
- add_library (sqlite3_amplify_db_common SHARED "sqlite3_flutter.c" )
54
-
55
- target_include_directories (sqlite3_amplify_db_common PRIVATE "${sqlite3_SOURCE_DIR} " )
56
- target_compile_options (sqlite3_amplify_db_common PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O2>" "/w" )
57
-
58
- target_compile_definitions (sqlite3_amplify_db_common PRIVATE
59
- SQLITE_ENABLE_DBSTAT_VTAB
60
- SQLITE_ENABLE_FTS5
61
- SQLITE_ENABLE_RTREE
62
- SQLITE_DQS=0
63
- SQLITE_DEFAULT_MEMSTATUS=0
64
- SQLITE_TEMP_STORE=2
65
- SQLITE_MAX_EXPR_DEPTH=0
66
- SQLITE_STRICT_SUBTYPE=1
67
- SQLITE_OMIT_AUTHORIZATION
68
- SQLITE_OMIT_DECLTYPE
69
- SQLITE_OMIT_DEPRECATED
70
- SQLITE_OMIT_PROGRESS_CALLBACK
71
- SQLITE_OMIT_SHARED_CACHE
72
- SQLITE_OMIT_TCL_VARIABLE
73
- SQLITE_OMIT_TRACE
74
- SQLITE_USE_ALLOCA
75
- SQLITE_UNTESTABLE
76
- SQLITE_HAVE_ISNAN
77
- SQLITE_HAVE_LOCALTIME_R
78
- SQLITE_HAVE_LOCALTIME_S
79
- )
80
- endif ()
81
-
82
- # Ensure sqlite3_amplify_db_common is used by the plugin
83
- add_dependencies (${PLUGIN_NAME} sqlite3_amplify_db_common )
84
-
85
- # List of absolute paths to libraries that should be bundled with the plugin
86
- set (amplify_db_common_bundled_libraries
87
- "$<TARGET_FILE:sqlite3_amplify_db_common>"
88
- PARENT_SCOPE
89
- )
0 commit comments