2017-08-09 14:46:01 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO jbeder/yaml-cpp
|
2020-06-03 13:35:48 +08:00
|
|
|
REF 9a3624205e8774953ef18f57067b3426c1c5ada6 #v0.6.3
|
|
|
|
SHA512 9bd0f05b882beed748eddb5d615bf356b7d1f31c4e3a4bbf80a6bdeb30b33fa1e0ccf596161a489169e6a111a3112e371d8d00514a0bfd02e6a6a11513904bed
|
2017-08-09 14:46:01 +02:00
|
|
|
HEAD_REF master
|
2018-06-14 18:59:18 -07:00
|
|
|
PATCHES
|
2020-06-03 13:35:48 +08:00
|
|
|
fix-include-path.patch
|
2016-11-22 22:11:57 +09:00
|
|
|
)
|
|
|
|
|
2020-06-03 13:35:48 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
set(YAML_BUILD_SHARED_LIBS ON)
|
|
|
|
else()
|
|
|
|
set(YAML_BUILD_SHARED_LIBS OFF)
|
|
|
|
endif()
|
|
|
|
|
2016-11-22 22:11:57 +09:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-08-09 14:46:01 +02:00
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DYAML_CPP_BUILD_TOOLS=OFF
|
2018-02-22 07:54:18 -08:00
|
|
|
-DYAML_CPP_BUILD_TESTS=OFF
|
2020-06-03 13:35:48 +08:00
|
|
|
-DYAML_BUILD_SHARED_LIBS=${YAML_BUILD_SHARED_LIBS}
|
2016-11-22 22:11:57 +09:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
2018-03-21 12:27:29 -07:00
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
|
|
|
|
endif()
|
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/yaml-cpp)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/yaml-cpp)
|
|
|
|
endif()
|
2017-08-09 14:46:01 +02:00
|
|
|
|
2016-11-22 22:11:57 +09:00
|
|
|
# Remove debug include files
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-08-09 14:46:01 +02:00
|
|
|
|
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h DLL_H)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
string(REPLACE "#ifdef YAML_CPP_DLL" "#if 1" DLL_H "${DLL_H}")
|
|
|
|
else()
|
|
|
|
string(REPLACE "#ifdef YAML_CPP_DLL" "#if 0" DLL_H "${DLL_H}")
|
|
|
|
endif()
|
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h "${DLL_H}")
|
2016-11-22 22:11:57 +09:00
|
|
|
|
|
|
|
# Handle copyright
|
2020-06-03 13:35:48 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|