2018-01-06 17:58:22 +08:00
|
|
|
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO "SRombauts/SQLiteCpp"
|
2023-05-31 02:40:59 +08:00
|
|
|
REF ${VERSION}
|
2018-01-06 17:58:22 +08:00
|
|
|
HEAD_REF master
|
2024-08-23 17:08:13 +08:00
|
|
|
SHA512 e65695765756570d3b2df9151c968f76d434b9ec1dbcffa71e6b58a0cad005dc60c03ac826269d0292ecda2ad2abfbf2acd1cb71fb11967f53ff58140ea133fd
|
2018-01-06 17:58:22 +08:00
|
|
|
PATCHES
|
2020-08-25 01:57:38 +08:00
|
|
|
fix_dependency.patch
|
2023-05-31 02:40:59 +08:00
|
|
|
add_runtime_destination.patch
|
2019-10-08 01:35:13 +08:00
|
|
|
)
|
2018-01-06 17:58:22 +08:00
|
|
|
|
2020-10-31 04:29:32 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2022-11-17 05:20:56 +08:00
|
|
|
sqlcipher SQLITE_HAS_CODEC
|
2020-10-31 04:29:32 +08:00
|
|
|
)
|
2022-11-17 05:20:56 +08:00
|
|
|
|
2022-07-19 06:09:27 +08:00
|
|
|
set(USE_STACK_PROTECTION "")
|
|
|
|
if(VCPKG_TARGET_IS_MINGW)
|
|
|
|
set(USE_STACK_PROTECTION "-DSQLITECPP_USE_STACK_PROTECTION=OFF")
|
|
|
|
endif()
|
2020-10-31 04:29:32 +08:00
|
|
|
|
2022-11-17 05:20:56 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-01-06 17:58:22 +08:00
|
|
|
OPTIONS
|
2020-10-31 04:29:32 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2018-01-06 17:58:22 +08:00
|
|
|
-DSQLITECPP_RUN_CPPLINT=OFF
|
|
|
|
-DSQLITECPP_RUN_CPPCHECK=OFF
|
|
|
|
-DSQLITECPP_INTERNAL_SQLITE=OFF
|
2023-02-07 04:00:37 +08:00
|
|
|
-DSQLITE_ENABLE_COLUMN_METADATA=ON
|
2022-11-17 05:20:56 +08:00
|
|
|
-DSQLITECPP_USE_STATIC_RUNTIME=OFF # unconditionally off because vcpkg's toolchains already do the right thing
|
|
|
|
# See https://github.com/SRombauts/SQLiteCpp/blob/e74403264ec7093060f4ed0e84bc9208997c8344/CMakeLists.txt#L40-L46
|
2022-07-19 06:09:27 +08:00
|
|
|
${USE_STACK_PROTECTION}
|
2018-01-06 17:58:22 +08:00
|
|
|
)
|
|
|
|
|
2022-11-17 05:20:56 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SQLiteCpp)
|
2018-01-06 17:58:22 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2022-11-17 05:20:56 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|