mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 02:13:03 +08:00
Merge pull request #1299 from atkawa7/jansson
[jansson] new port required by nghttp2 #1122
This commit is contained in:
commit
78fff8f2ea
3
ports/jansson/CONTROL
Normal file
3
ports/jansson/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: jansson
|
||||
Version: v2.10
|
||||
Description: Jansson is a C library for encoding, decoding and manipulating JSON data
|
39
ports/jansson/portfile.cmake
Normal file
39
ports/jansson/portfile.cmake
Normal file
@ -0,0 +1,39 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO akheron/jansson
|
||||
REF v2.10
|
||||
SHA512 0859c8a29c1cb7e406d3eb369285500e98ee23677e3a6af6cd81511c57a6aa8dbabe4a8c7b673a3000203b68f74d84786817aec76cb1e85af217268159bda4b6
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
||||
set(JANSSON_STATIC_CRT ON)
|
||||
else()
|
||||
set(JANSSON_STATIC_CRT OFF)
|
||||
endif()
|
||||
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(JANSSON_BUILD_SHARED_LIBS ON)
|
||||
else()
|
||||
set(JANSSON_BUILD_SHARED_LIBS OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT}
|
||||
-DJANSSON_EXAMPLES=OFF
|
||||
-DJANSSON_WITHOUT_TESTS=ON
|
||||
-DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake(DISABLE_PARALLEL)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
@ -16,6 +16,10 @@
|
||||
function(vcpkg_fixup_cmake_targets)
|
||||
cmake_parse_arguments(_vfct "" "CONFIG_PATH" "" ${ARGN})
|
||||
|
||||
if(_vfct_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "vcpkg_fixup_cmake_targets was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/share/${PORT})
|
||||
set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user