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