Skip to content

Commit

Permalink
Fix build with yaml-cpp installed system-wise (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbogusz authored and mikaelarguedas committed May 22, 2018
1 parent d69b6f1 commit f0bc068
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rviz_yaml_cpp_vendor/rviz_yaml_cpp_vendor-extras.cmake.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
find_package(yaml-cpp QUIET)
## mjbogusz: find_package() and if() disabled until ament can handle complex paths resolving to /usr/include
## always use locally built yaml-cpp for now
# find_package(yaml-cpp QUIET)

if(NOT yaml-cpp_FOUND)
# if(NOT yaml-cpp_FOUND)
# add the local Modules directory to the modules path
if(WIN32)
set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_yaml_cpp_vendor/CMake")
else()
set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_yaml_cpp_vendor/lib/cmake/yaml-cpp")
endif()
message(STATUS "Setting yaml-cpp_DIR to: '${yaml-cpp_DIR}'")
endif()
# endif()

find_package(yaml-cpp CONFIG REQUIRED QUIET)

Expand Down

0 comments on commit f0bc068

Please sign in to comment.