vcpkg/ports/daw-json-link/portfile.cmake
Cheney Wang 621d51c1c0
[daw-json-link/daw-header-libraries] Update version to latest (#27483)
* [daw-json-link/daw-header-libraries] Update version

* x-add-version
2022-10-27 19:16:01 -07:00

41 lines
1.7 KiB
CMake

# Header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO beached/daw_json_link
REF f324fbfe2b563b11ca58c12743bfce4672990e5b #v3.1.1
SHA512 01873ad03772922d588839667a0e82e4d47f82662b8901b252b8ddf7b368d22f2d09f67eecacfdab9bbdf9a3af4494ba0d3b72aacdcf7efd043e3970e0f1ba4d
HEAD_REF master
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DDAW_USE_PACKAGE_MANAGEMENT=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH share/${PORT}/cmake)
# remove empty lib and debug/lib directories (and duplicate files from debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")
# Append the json-link and dragonbox license information into a single
# copyright file (they are both Boost v1.0 but it is good to be clear).
file(APPEND "${SOURCE_PATH}/copyright" [=[+----------------------------------------------------------------------------+
| json-link copywrite |
+----------------------------------------------------------------------------+
]=])
file(READ "${SOURCE_PATH}/LICENSE" json_link_copywrite)
file(APPEND "${SOURCE_PATH}/copyright" ${json_link_copywrite})
file(APPEND "${SOURCE_PATH}/copyright" [=[
+----------------------------------------------------------------------------+
| dragonbox copywrite |
+----------------------------------------------------------------------------+
]=])
file(READ "${SOURCE_PATH}/LICENSE_Dragonbox" dragonbox_copywrite)
file(APPEND "${SOURCE_PATH}/copyright" ${dragonbox_copywrite})
file(INSTALL "${SOURCE_PATH}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")