aboutsummaryrefslogtreecommitdiff
path: root/ports/yaml-cpp
diff options
context:
space:
mode:
authorWimok Nupphiboon <wimok.mok@gmail.com>2018-03-24 11:53:55 +0700
committerWimok Nupphiboon <wimok.mok@gmail.com>2018-03-24 11:53:55 +0700
commit663be4bbffd435cf5e5fc62a0774c784c10ddc68 (patch)
treed214f24405fa75d4dad9dfb938a04846d2ca6102 /ports/yaml-cpp
parent1e380dde21317e73d1859dad1c64c06eb88cc502 (diff)
parentaa57df6d6ed6d17000522492b66fc93d3f32ab86 (diff)
downloadvcpkg-663be4bbffd435cf5e5fc62a0774c784c10ddc68.tar.gz
vcpkg-663be4bbffd435cf5e5fc62a0774c784c10ddc68.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'ports/yaml-cpp')
-rw-r--r--ports/yaml-cpp/portfile.cmake16
1 files changed, 14 insertions, 2 deletions
diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake
index 0fc4f05b6..071931f64 100644
--- a/ports/yaml-cpp/portfile.cmake
+++ b/ports/yaml-cpp/portfile.cmake
@@ -17,7 +17,12 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
-vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
+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()
# Adjust paths and remove hardcoded ones from the config files
file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-config.cmake YAML_CONFIG)
@@ -32,7 +37,14 @@ get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)
get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" YAML_CONFIG "${YAML_CONFIG}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets.cmake "${YAML_CONFIG}")
-foreach(CONF debug release)
+set(_targets_cmake_conf)
+if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ list(APPEND _targets_cmake_conf "debug")
+endif()
+if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
+ list(APPEND _targets_cmake_conf "release")
+endif()
+foreach(CONF ${_targets_cmake_conf})
file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake YAML_CONFIG)
string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" YAML_CONFIG "${YAML_CONFIG}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake "${YAML_CONFIG}")