vcpkg/ports/jsoncpp/portfile.cmake

35 lines
1.0 KiB
CMake
Raw Normal View History

2017-08-27 21:24:51 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO open-source-parsers/jsoncpp
REF 1.9.5
SHA512 1d06e044759b1e1a4cc4960189dd7e001a0a4389d7239a6d59295af995a553518e4e0337b4b4b817e70da5d9731a4c98655af90791b6287870b5ff8d73ad8873
2017-08-27 21:24:51 +08:00
HEAD_REF master
2016-11-16 23:10:35 +08:00
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" JSONCPP_STATIC)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
2016-11-17 05:13:08 +08:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DJSONCPP_WITH_CMAKE_PACKAGE=ON
-DBUILD_STATIC_LIBS=${JSONCPP_STATIC}
-DJSONCPP_STATIC_WINDOWS_RUNTIME=${STATIC_CRT}
2023-10-13 10:34:04 +08:00
-DJSONCPP_WITH_PKGCONFIG_SUPPORT=ON
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
-DJSONCPP_WITH_TESTS=OFF
-DJSONCPP_WITH_EXAMPLE=OFF
2016-11-16 23:10:35 +08:00
)
vcpkg_cmake_install()
2016-11-16 23:10:35 +08:00
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/jsoncpp)
2016-11-16 23:10:35 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
2016-11-16 23:10:35 +08:00
vcpkg_copy_pdbs()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
2023-10-13 10:34:04 +08:00
vcpkg_fixup_pkgconfig()