2019-06-01 15:19:52 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO json-c/json-c
|
2024-02-07 04:45:43 +08:00
|
|
|
REF b4c371fa0cbc4dcbaccc359ce9e957a22988fb34
|
|
|
|
SHA512 1338271a6f9ffb3b8a8d4f2ec36a374ed84b3c91f789b607693c08cbeb38c4fdd813593f530ff94e841a095ff367a3ae8c5f5e7dbcb64e8f9044f6affdf24505
|
2019-06-01 15:19:52 +08:00
|
|
|
HEAD_REF master
|
2020-10-17 03:34:37 +08:00
|
|
|
PATCHES pkgconfig.patch
|
2022-08-11 02:25:10 +08:00
|
|
|
fix-clang-cl.patch
|
2019-06-01 15:19:52 +08:00
|
|
|
)
|
|
|
|
|
2024-02-07 04:45:43 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" JSON_BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" JSON_BUILD_SHARED)
|
|
|
|
|
2022-07-08 05:19:24 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2022-08-23 00:35:38 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
2024-02-07 04:45:43 +08:00
|
|
|
-DBUILD_STATIC_LIBS=${JSON_BUILD_STATIC}
|
|
|
|
-DBUILD_SHARED_LIBS=${JSON_BUILD_SHARED}
|
2019-06-01 15:19:52 +08:00
|
|
|
)
|
|
|
|
|
2022-07-08 05:19:24 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-06-01 15:19:52 +08:00
|
|
|
|
2022-07-08 05:19:24 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
2020-10-17 03:34:37 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2019-06-01 15:19:52 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2022-07-08 05:19:24 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-06-01 15:19:52 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2024-02-07 04:45:43 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|