vcpkg/ports/yaml-cpp/0002-fix-include-path.patch
JackBoosY e64f2a493a [yaml-cpp]Fix include path in yaml-cpp-config.cmake (#7847)
* [yaml-cpp]Fix include path in yaml-cpp-config.cmake

* [yaml-cpp]Remove useless code.
2019-08-27 14:47:32 -07:00

14 lines
608 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d2d8810..c4d4be1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -326,7 +326,7 @@ else()
set(INSTALL_CMAKE_DIR ${LIB_INSTALL_DIR}/cmake/yaml-cpp)
endif()
-file(RELATIVE_PATH REL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_ROOT_DIR}")
+set(REL_INCLUDE_DIR "../../include")
set(CONFIG_INCLUDE_DIRS "\${YAML_CPP_CMAKE_DIR}/${REL_INCLUDE_DIR}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" @ONLY)