Skip to content

cmake: make yaml-cpp package relocatable#446

Closed
sergiud wants to merge 1 commit intojbeder:masterfrom
sergiud:cmake-relocatable-package
Closed

cmake: make yaml-cpp package relocatable#446
sergiud wants to merge 1 commit intojbeder:masterfrom
sergiud:cmake-relocatable-package

Conversation

@sergiud
Copy link
Copy Markdown

@sergiud sergiud commented Dec 5, 2016

This PR makes yaml-cpp-config.cmake relocatable allowing the package to be used both from the build tree and the install path. The changes are backwards compatible.

Typical usage of yaml-cpp-config.cmake:

find_package (yaml-cpp 0.5.3 REQUIRED)

add_executable (myproject main.cpp)
target_link_libraries (myproject yaml-cpp)

The yaml-cpp-config.cmake is now always installed under ${CMAKE_INSTALL_PREFIX}/(lib|lib64)/cmake/yaml-cpp. This change was necessary to simplify the config logic. Previously, yaml-cpp-config.cmake was installed under ${CMAKE_INSTALL_PREFIX}/CMake for Win32 (excluding cygwin), and ${CMAKE_INSTALL_PREFIX}/(lib|lib64)/cmake/yaml-cpp on other platforms. The different config paths that depend on the platform in use are unnecessary.

@ligfx
Copy link
Copy Markdown

ligfx commented Feb 17, 2017

+1 This solved my issue with propagating include paths on the yaml-cpp target when built inside a larger target.

I can't speak to the change in yaml-cpp-config.cmake location.

@SGSSGene
Copy link
Copy Markdown
Collaborator

seems to be fixed in $475 or #538.

Please feel free to reopen if issue continues to exists.

@SGSSGene SGSSGene closed this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants