vcpkg/ports/sqlite-orm/portfile.cmake
2024-10-21 21:37:37 -07:00

34 lines
951 B
CMake

# header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fnc12/sqlite_orm
REF "v${VERSION}"
SHA512 a9a31b534d9374364672d698a1d08ba3d0b2c06d91a3fc38c3fcf73eb2efc272f118bb05c5b4ea720ceac01f54ee02debd86de31cad645001ed2b8db943ebe33
HEAD_REF master
PATCHES
fix-dependency.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
test BUILD_TESTING
example BUILD_EXAMPLES
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DSQLITE_ORM_ENABLE_CXX_17=OFF
-DSQLITE_ORM_ENABLE_CXX_20=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME SqliteOrm CONFIG_PATH lib/cmake/SqliteOrm)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)