2017-06-17 03:00:00 +08:00
|
|
|
vcpkg_from_github(
|
2017-06-21 00:45:11 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO akheron/jansson
|
2022-04-27 10:23:52 +08:00
|
|
|
REF 684e18c927e89615c2d501737e90018f4930d6c5 # v2.14
|
|
|
|
SHA512 e2cac3567bc860d10d9aa386ce370876cb21ff083a970abeb48112b6586b91cd101694a98cb05a06795fb04498e6bc2df3615fedb86635f5a998b68e5670e5b3
|
2017-06-21 00:45:11 +08:00
|
|
|
HEAD_REF master
|
2022-04-29 11:50:41 +08:00
|
|
|
PATCHES
|
|
|
|
fix-linker-flags.patch
|
2017-06-17 03:00:00 +08:00
|
|
|
)
|
|
|
|
|
2022-04-29 11:50:41 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" JANSSON_STATIC_CRT)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" JANSSON_BUILD_SHARED_LIBS)
|
2017-06-21 00:45:11 +08:00
|
|
|
|
2017-11-22 21:30:48 +08:00
|
|
|
# Jansson tries to random-seed its hash table with system-provided entropy.
|
|
|
|
# This is not ported to UWP yet.
|
2022-04-29 11:50:41 +08:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
2017-11-22 21:30:48 +08:00
|
|
|
set(USE_WINDOWS_CRYPTOAPI OFF)
|
|
|
|
else()
|
|
|
|
set(USE_WINDOWS_CRYPTOAPI ON)
|
|
|
|
endif()
|
|
|
|
|
2022-04-29 11:50:41 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-06-21 00:45:11 +08:00
|
|
|
OPTIONS
|
2018-03-12 14:41:51 +08:00
|
|
|
-DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT}
|
|
|
|
-DJANSSON_EXAMPLES=OFF
|
|
|
|
-DJANSSON_WITHOUT_TESTS=ON
|
2022-04-29 11:50:41 +08:00
|
|
|
-DJANSSON_BUILD_DOCS=OFF
|
2018-03-12 14:41:51 +08:00
|
|
|
-DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS}
|
|
|
|
-DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI}
|
|
|
|
-DJANSSON_INSTALL_CMAKE_DIR:STRING=share/jansson
|
2017-06-17 03:00:00 +08:00
|
|
|
)
|
|
|
|
|
2022-04-29 11:50:41 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-06-17 03:00:00 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-04-29 11:50:41 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2021-10-28 06:19:28 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2022-04-29 11:50:41 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|