2019-01-27 05:01:25 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO rbock/sqlpp11
|
2022-07-06 06:35:30 +08:00
|
|
|
REF 2bc89b34ad3cc37b6bca9a44a3529ff2d8fe211f # 0.61
|
|
|
|
SHA512 6e2496959749422987aca21f333abb01648702b85e02acc711bbac398ca6a67d8be93a3d89fc1f8bad5446865725ff9bcc053e6229cb34627120b59469426266
|
2019-01-27 05:01:25 +08:00
|
|
|
HEAD_REF master
|
2020-09-28 08:33:19 +08:00
|
|
|
PATCHES
|
|
|
|
ddl2cpp_path.patch
|
2019-01-27 05:01:25 +08:00
|
|
|
)
|
|
|
|
|
2022-07-06 06:35:30 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
sqlite3 BUILD_SQLITE3_CONNECTOR
|
|
|
|
mariadb BUILD_MARIADB_CONNECTOR
|
|
|
|
mysql BUILD_MYSQL_CONNECTOR
|
|
|
|
)
|
|
|
|
|
|
|
|
# Use sqlpp11's own build process
|
|
|
|
vcpkg_cmake_configure(
|
2019-01-27 05:01:25 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
2022-07-06 06:35:30 +08:00
|
|
|
-DBUILD_TESTING:BOOL=OFF
|
|
|
|
# Use vcpkg as source for the date library
|
|
|
|
-DUSE_SYSTEM_DATE:BOOL=ON
|
|
|
|
${FEATURE_OPTIONS}
|
2019-01-27 05:01:25 +08:00
|
|
|
)
|
2020-06-11 08:52:14 +08:00
|
|
|
|
2022-07-06 06:35:30 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-01-27 05:01:25 +08:00
|
|
|
|
|
|
|
# Move CMake config files to the right place
|
2022-07-06 06:35:30 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Sqlpp11)
|
2019-01-27 05:01:25 +08:00
|
|
|
|
|
|
|
# Delete redundant and unnecessary directories
|
2020-09-28 08:33:19 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/include/date)
|
2019-01-27 05:01:25 +08:00
|
|
|
|
2019-03-16 02:44:28 +08:00
|
|
|
# Move python script from bin directory
|
|
|
|
file(COPY ${CURRENT_PACKAGES_DIR}/bin/sqlpp11-ddl2cpp DESTINATION ${CURRENT_PACKAGES_DIR}/scripts)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/)
|
|
|
|
|
2019-01-27 05:01:25 +08:00
|
|
|
# Handle copyright
|
2020-06-11 08:52:14 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|