@@ -89,6 +89,9 @@ if(CMAKE_SYSTEM MATCHES "Windows")
8989 corrosion_add_target_rustflags(chewing_capi -Ctarget-feature=+crt-static )
9090 corrosion_add_target_rustflags(chewing_testhelper -Ctarget-feature=+crt-static )
9191 corrosion_add_target_rustflags(chewing-cli -Ctarget-feature=+crt-static )
92+ if (VCPKG_TARGET_TRIPLET)
93+ corrosion_set_env_vars(chewing-cli VCPKGRS_TRIPLET=${VCPKG_TARGET_TRIPLET} )
94+ endif ()
9295endif ()
9396
9497# Feature probe
@@ -99,39 +102,10 @@ set(CURSES_NEED_WIDE true)
99102find_package (Curses)
100103
101104if (WITH_SQLITE3)
102- find_package (SQLite3 QUIET )
105+ find_package (SQLite3 REQUIRED )
103106 if (SQLite3_FOUND)
104107 message (STATUS "Found SQLite3 version ${SQLite3_VERSION} " )
105108 include_directories (SQLite3_INCLUDE_DIRS)
106- else ()
107- message (STATUS "Fetching SQLite3 source from internet" )
108- FetchContent_Declare(
109- SQLite3
110- URL https://www.sqlite.org/2024/sqlite-amalgamation-3460000.zip
111- URL_HASH SHA3_256=1221eed70de626871912bfca144c00411f0c30d3c2b7935cff3963b63370ef7c
112- )
113- FetchContent_MakeAvailable(SQLite3)
114-
115- include_directories (${sqlite3_SOURCE_DIR} )
116- add_library (sqlite3_library STATIC
117- ${sqlite3_SOURCE_DIR} /sqlite3.c
118- ${sqlite3_SOURCE_DIR} /sqlite3.h
119- )
120- find_package (Threads)
121- target_link_libraries (sqlite3_library PUBLIC ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} )
122- set (SQLite3_LIBRARIES sqlite3_library)
123-
124- add_executable (sqlite3
125- ${sqlite3_SOURCE_DIR} /shell.c
126- )
127- target_link_libraries (sqlite3 PRIVATE ${SQLite3_LIBRARIES} )
128- set_target_properties (sqlite3 PROPERTIES
129- RUNTIME_OUTPUT_DIRECTORY ${sqlite3_BINARY_DIR}
130- RUNTIME_OUTPUT_DIRECTORY_DEBUG ${sqlite3_BINARY_DIR}
131- RUNTIME_OUTPUT_DIRECTORY_RELEASE ${sqlite3_BINARY_DIR}
132- RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${sqlite3_BINARY_DIR}
133- RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${sqlite3_BINARY_DIR}
134- )
135109 endif ()
136110endif ()
137111
0 commit comments