2016-11-16 16:10:35 +01:00
|
|
|
include(vcpkg_common_functions)
|
2017-08-27 15:24:51 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO open-source-parsers/jsoncpp
|
2018-03-02 16:03:57 -08:00
|
|
|
REF 1.8.4
|
|
|
|
SHA512 f70361a3263dd8b9441374a9a409462be1426c0d6587c865171a80448ab73b3f69de2b4d70d2f0c541764e1e6cccc727dd53178347901f625ec6fb54fb94f4f1
|
2017-08-27 15:24:51 +02:00
|
|
|
HEAD_REF master
|
2016-11-16 16:10:35 +01:00
|
|
|
)
|
|
|
|
|
2016-11-16 13:13:08 -08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
set(JSONCPP_STATIC OFF)
|
|
|
|
set(JSONCPP_DYNAMIC ON)
|
|
|
|
else()
|
|
|
|
set(JSONCPP_STATIC ON)
|
|
|
|
set(JSONCPP_DYNAMIC OFF)
|
|
|
|
endif()
|
|
|
|
|
2016-11-16 16:10:35 +01:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-08-27 15:24:51 +02:00
|
|
|
PREFER_NINJA
|
2019-02-01 23:38:44 -08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
2016-11-16 16:10:35 +01:00
|
|
|
OPTIONS -DJSONCPP_WITH_CMAKE_PACKAGE:BOOL=ON
|
2016-11-16 13:13:08 -08:00
|
|
|
-DBUILD_STATIC_LIBS:BOOL=${JSONCPP_STATIC}
|
|
|
|
-DBUILD_SHARED_LIBS:BOOL=${JSONCPP_DYNAMIC}
|
2017-08-27 15:24:51 +02:00
|
|
|
-DJSONCPP_WITH_PKGCONFIG_SUPPORT:BOOL=OFF
|
|
|
|
-DJSONCPP_WITH_TESTS:BOOL=OFF
|
2016-11-16 16:10:35 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
# Fix CMake files
|
2017-08-27 15:24:51 +02:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/jsoncpp)
|
2016-11-16 16:10:35 +01:00
|
|
|
|
2017-08-27 15:24:51 +02:00
|
|
|
# Remove includes in debug
|
2016-11-16 16:10:35 +01:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsoncpp)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/jsoncpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/jsoncpp/copyright)
|
|
|
|
|
|
|
|
# Copy pdb files
|
|
|
|
vcpkg_copy_pdbs()
|