2017-06-17 03:00:00 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
2017-06-21 00:45:11 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO akheron/jansson
|
|
|
|
REF v2.10
|
|
|
|
SHA512 0859c8a29c1cb7e406d3eb369285500e98ee23677e3a6af6cd81511c57a6aa8dbabe4a8c7b673a3000203b68f74d84786817aec76cb1e85af217268159bda4b6
|
|
|
|
HEAD_REF master
|
2017-06-17 03:00:00 +08:00
|
|
|
)
|
|
|
|
|
2017-06-21 00:50:46 +08:00
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
2017-06-17 03:00:00 +08:00
|
|
|
set(JANSSON_STATIC_CRT ON)
|
|
|
|
else()
|
|
|
|
set(JANSSON_STATIC_CRT OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2017-06-21 00:45:11 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
set(JANSSON_BUILD_SHARED_LIBS ON)
|
|
|
|
else()
|
|
|
|
set(JANSSON_BUILD_SHARED_LIBS OFF)
|
|
|
|
endif()
|
|
|
|
|
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.
|
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
set(USE_WINDOWS_CRYPTOAPI OFF)
|
|
|
|
else()
|
|
|
|
set(USE_WINDOWS_CRYPTOAPI ON)
|
|
|
|
endif()
|
|
|
|
|
2017-06-17 03:00:00 +08:00
|
|
|
vcpkg_configure_cmake(
|
2017-06-21 00:45:11 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-12-08 20:50:06 +08:00
|
|
|
PREFER_NINJA
|
2017-06-21 00:45:11 +08:00
|
|
|
OPTIONS
|
|
|
|
-DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT}
|
2017-06-17 03:00:00 +08:00
|
|
|
-DJANSSON_EXAMPLES=OFF
|
2017-06-21 00:45:11 +08:00
|
|
|
-DJANSSON_WITHOUT_TESTS=ON
|
|
|
|
-DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS}
|
2017-11-22 21:30:48 +08:00
|
|
|
-DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI}
|
2017-06-17 03:00:00 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake(DISABLE_PARALLEL)
|
2017-06-21 07:19:36 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
2017-06-17 03:00:00 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-06-21 07:19:36 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright)
|
2017-06-17 03:00:00 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|