vcpkg/ports/sqlite-orm/portfile.cmake

44 lines
1.2 KiB
CMake
Raw Normal View History

# header-only library
2018-03-24 01:55:04 +08:00
set(FEATURE_PATCHES)
if(test IN_LIST FEATURES)
list(APPEND FEATURE_PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-test-feature.patch)
endif()
if(example IN_LIST FEATURES)
list(APPEND FEATURE_PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-example-feature.patch)
endif()
2018-03-24 01:55:04 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fnc12/sqlite_orm
REF b30ddc6a50dc582c93cd49d8d0cf8f5025ba1d2b # 1.5
SHA512 faeeef88aef11e89e9565850c23087925fb4d75ef48a16434055f18831db8e230d044c81574d840dacca406d7095cb83a113afc326996e289ab11a02d8caa2f4
2018-03-24 01:55:04 +08:00
HEAD_REF master
PATCHES
fix-build-error.patch
fix-usage.patch
${FEATURE_PATCHES}
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
test SqliteOrm_BuildTests
example BUILD_EXAMPLES
2018-03-24 01:55:04 +08:00
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS}
-DSQLITE_ORM_ENABLE_CXX_17=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sqlite_orm TARGET_PATH share/SqliteOrm)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
2018-03-24 01:55:04 +08:00
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)