vcpkg/ports/parson/portfile.cmake

32 lines
943 B
CMake
Raw Normal View History

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message("parson only supports static linkage")
set(VCPKG_LIBRARY_LINKAGE "static")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO kgabis/parson
REF 102a4467e10c77ffcfde1d233798780acd719cc5 # accessed on 2020-09-14
SHA512 8498e667525a0f08881c4041877194bf68926af34c9f0cbd9fd3d9538c31e0ad1ab1c083fbee48423f4ffd99f46e25918928c43585206237c8f723e5e47b17b7
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
file(COPY ${SOURCE_PATH}/parson.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-parson TARGET_PATH share/unofficial-parson)
file(INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/parson RENAME copyright)
vcpkg_copy_pdbs()