2017-06-29 04:21:01 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO hyperrealm/libconfig
|
2023-10-24 02:29:14 +08:00
|
|
|
REF "v${VERSION}"
|
2021-08-19 08:24:14 +08:00
|
|
|
SHA512 3749bf9eb29bab0f6b14f4fc759f0c419ed27a843842aaabed1ec1fbe0faa8c93322ff875ca1291d69cb28a39ece86d512aec42c2140d566c38c56dc616734f4
|
2017-06-29 04:21:01 +08:00
|
|
|
HEAD_REF master
|
2023-10-24 02:29:14 +08:00
|
|
|
PATCHES
|
|
|
|
libconfig++-cmake-export.diff
|
2023-11-29 16:51:30 +08:00
|
|
|
static-build.diff
|
2017-06-29 04:21:01 +08:00
|
|
|
)
|
|
|
|
|
2023-10-24 02:29:14 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_EXAMPLES=OFF
|
|
|
|
-DBUILD_TESTS=OFF
|
|
|
|
)
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-03-26 11:43:02 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2023-10-24 02:29:14 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libconfig)
|
2020-03-26 11:43:02 +08:00
|
|
|
|
2023-10-24 02:29:14 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-07-08 14:11:46 +08:00
|
|
|
|
2023-10-24 02:29:14 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libconfig.h" "defined(LIBCONFIG_STATIC)" "1")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libconfig.h++" "defined(LIBCONFIGXX_STATIC)" "1")
|
|
|
|
endif()
|
2017-07-08 14:11:46 +08:00
|
|
|
|
2023-10-24 02:29:14 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|