Skip to content

Commit

Permalink
fix: discontinue using yaml-cpp-config.camke as it seems faulty
Browse files Browse the repository at this point in the history
Ask for the YAML_CPP_CMAKE_DIR and YAML_CPP_INCLUDE_DIR
directly.

CMakeLists.txt
  • Loading branch information
heralex committed Feb 17, 2024
1 parent 4361695 commit 84307f8
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -506,22 +506,24 @@ endif(PYTHONSUPPORT)
#====================================================================
# ask for YAML library and header dir
#====================================================================
find_package(yaml-cpp
HINTS
/usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/yaml-cpp-cdonfig.cmake
c:/opt/yaml-cpp/yaml-cpp-config.cmake
PATHS
/usr/lib/x86_64-linux-gnu/cmake
/usr/lib/cmake
c:/opt/yaml-cpp
)
# the yaml-cpp-config.cmake does not work properly, so we make do without it for now
#find_package(yaml-cpp
# HINTS
# /usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/yaml-cpp-config.cmake
# c:/opt/yaml-cpp/yaml-cpp-config.cmake
# PATHS
# /usr/lib/x86_64-linux-gnu/cmake
# /usr/lib/cmake
# c:/opt/yaml-cpp
#)

if (NOT YAML_CPP_CMAKE_DIR)
set(YAML_CPP_CMAKE_DIR "YAML_CPP_CMAKE_DIR-NOTFOUND" CACHE STRING "Please specify the path of yaml-cpp-config.cmake" )
message(FATAL_ERROR "Please specify the path of yaml-cpp-config.cmake!" )
else()
include(${YAML_CPP_CMAKE_DIR}/yaml-cpp-config-version.cmake)
SET(LUMASS_yaml_version "${PACKAGE_VERSION}")
set(YAML_CPP_LIBRARIES "yaml-cpp")
message(STATUS "yaml-cpp version: ${LUMASS_yaml_version}")
endif()

Expand Down

0 comments on commit 84307f8

Please sign in to comment.