• Pierre Wendling's avatar
    CMake: Fixes for generated config (#1212) · c26e0472
    Pierre Wendling authored
    
    
    * CMake: Add option to set the package install dir.
    
    * CMake: Fix generated config.
    
    - `YAML_CPP_SHARED_LIBS_BUILT` should not be set with a `PATH_VAR` as it
    would always evaluate to true.
    - `YAML_CPP_LIBRARIES` should used the exported target name including
    the namespace, but `check_required_components` shouldn't.
    - Use `CMAKE_CURRENT_LIST_DIR` to find the target file, instead of a
    `PATH_VAR`. Package managers such as vcpkg move CMake configs after
    installing.
    
    * CI: Test the generated CMake package.
    
    * CMake: Create add a deprecated yaml-cpp target.
    
    This target is meant to provide compatibility with versions prior to
    0.8.0.
    
    * CMake: mark the yaml-cpp target as IMPORTED.
    
    ---------
    Co-authored-by: default avatarJesse Beder <jbeder+github@gmail.com>
    c26e0472
yaml-cpp-config.cmake.in 1.17 KB