Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix libyaml CMake package and CMake targets #8177

Merged
merged 2 commits into from Sep 16, 2019

Conversation

traversaro
Copy link
Contributor

The CMake exported targets and CMake package of libyaml were broken for the following reasons:

  • The CMake package of the port is called yaml, but the config files were installed in share/libyaml,
    so it was not possible for CMake's find_package command to find them
  • The CMake config file for the library is custom, so vcpkg_fixup_cmake_targets was not properly handling
    the change of CMake conf file directory from cmake to share/yaml. Use of the project's INSTALL_CMAKE_DIR
    option permitted to change easily also the custom part of the config file.

The CMake exported targets and CMake package of libyaml were broken for the following reasons:
* The CMake package of the port is called yaml, but the config files were installed in share/libyaml,
  so it was not possible for CMake's find_package command to find them
* The CMake config file for the library is custom, so vcpkg_fixup_cmake_targets was not properly handling
  the change of CMake conf file directory from cmake to share/yaml. Use of the project's INSTALL_CMAKE_DIR
  option permitted to change easily also the custom part of the config file.
@traversaro
Copy link
Contributor Author

traversaro commented Sep 15, 2019

Just to clarify, before this PR a simple CMake project such as :

project(sample-yaml-use) 
find_package(yaml REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main PRIVATE yaml)

was broken, and now works correctly.

@Rastaban Rastaban merged commit 0053942 into microsoft:master Sep 16, 2019
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.

None yet

2 participants