Hello,
as per issue title, I'm having a problem when I try to use yaml-cpp in a project I'm working on. Namely, the compiler can't find header files (but I suppose the same will go for libraries) when I try to compile.
This is due to the fact that the file used by CMake to set the paths of include and link directories does not set the proper values for the variables. The content of share/cmake/yaml-cpp/yaml-cpp-config.cmake after installation is;:
# - Config file for the yaml-cpp package
# It defines the following variables
# YAML_CPP_INCLUDE_DIR - include directory
# YAML_CPP_LIBRARIES - libraries to link against
# Compute paths
get_filename_component(YAML_CPP_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(YAML_CPP_INCLUDE_DIR "")
# Our library dependencies (contains definitions for IMPORTED targets)
include("${YAML_CPP_CMAKE_DIR}/yaml-cpp-targets.cmake")
# These are IMPORTED targets created by yaml-cpp-targets.cmake
set(YAML_CPP_LIBRARIES "")
As you can see, the variables YAML_INCLUDE_DIR and YAML_CPP_LIBRARIES are empty. I believe the problem may lie in the input file yaml-cpp-config.cmake.in:
# - Config file for the yaml-cpp package
# It defines the following variables
# YAML_CPP_INCLUDE_DIR - include directory
# YAML_CPP_LIBRARIES - libraries to link against
# Compute paths
get_filename_component(YAML_CPP_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(YAML_CPP_INCLUDE_DIR "@CONFIG_INCLUDE_DIRS@")
# Our library dependencies (contains definitions for IMPORTED targets)
include("${YAML_CPP_CMAKE_DIR}/yaml-cpp-targets.cmake")
# These are IMPORTED targets created by yaml-cpp-targets.cmake
set(YAML_CPP_LIBRARIES "@EXPORT_TARGETS@")
Indeed, grep-ing for CONFIG_INCLUDE_DIRS or EXPORT_TARGETS yields no results in the whole repository, so substitution should give an empty string.
Am I missing something?
Thanks!
mattia
Hello,
as per issue title, I'm having a problem when I try to use yaml-cpp in a project I'm working on. Namely, the compiler can't find header files (but I suppose the same will go for libraries) when I try to compile.
This is due to the fact that the file used by CMake to set the paths of include and link directories does not set the proper values for the variables. The content of
share/cmake/yaml-cpp/yaml-cpp-config.cmakeafter installation is;:As you can see, the variables
YAML_INCLUDE_DIRandYAML_CPP_LIBRARIESare empty. I believe the problem may lie in the input fileyaml-cpp-config.cmake.in:Indeed,
grep-ing forCONFIG_INCLUDE_DIRSorEXPORT_TARGETSyields no results in the whole repository, so substitution should give an empty string.Am I missing something?
Thanks!
mattia