Skip to content

Commit

Permalink
Upgrade to yaml-cpp 0.8.0 (#48)
Browse files Browse the repository at this point in the history
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
  • Loading branch information
marcoag and clalancette authored Apr 11, 2024
1 parent feb298e commit e3fb83f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ament_add_default_options()
# NO_CMAKE_PACKAGE_REGISTRY used to avoid finding the library downloaded in WORKSPACE B
# when building workspace A.
# This should only find a system installed yaml-cpp and thus the environment hook isn't needed.
find_package(yaml-cpp QUIET NO_CMAKE_PACKAGE_REGISTRY)
find_package(yaml-cpp 0.8.0 QUIET NO_CMAKE_PACKAGE_REGISTRY)

set(YAML_CPP_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
if(MSVC)
Expand All @@ -19,8 +19,8 @@ endif()
ament_vendor(yaml_cpp_vendor
SATISFIED ${yaml-cpp_FOUND}
VCS_URL https://github.com/jbeder/yaml-cpp.git
VCS_VERSION yaml-cpp-0.7.0
PATCHES patches
VCS_VERSION 0.8.0
GLOBAL_HOOK
CMAKE_ARGS
"-DCMAKE_CXX_FLAGS=${YAML_CPP_CXX_FLAGS}"
-DYAML_CPP_BUILD_CONTRIB:BOOL=OFF
Expand Down
11 changes: 0 additions & 11 deletions patches/0001-disable-shadow-warning.patch

This file was deleted.

18 changes: 0 additions & 18 deletions yaml_cpp_vendor-extras.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,3 @@ else()
set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/yaml_cpp_vendor/share/cmake/yaml-cpp")
endif()
message(STATUS "Setting yaml-cpp_DIR to: '${yaml-cpp_DIR}'")

find_package(yaml-cpp REQUIRED)

set(yaml_cpp_vendor_LIBRARIES ${YAML_CPP_LIBRARIES})
set(yaml_cpp_vendor_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})

# since yaml-cpp 0.8.0, yaml-cpp supports the yaml-cpp::yaml-cpp target
if(TARGET yaml-cpp::yaml-cpp)
list(APPEND yaml_cpp_vendor_TARGETS yaml-cpp::yaml-cpp)
else()
list(APPEND yaml_cpp_vendor_TARGETS yaml-cpp)
if(WIN32)
# On Windows, yaml-cpp 0.7.0 requires that downstream consumers set YAML_CPP_DLL and
# not yaml_cpp_EXPORT in order to set dllimport properly.
# This behavior will likely change in future versions of yaml-cpp.
set_target_properties(yaml-cpp PROPERTIES INTERFACE_COMPILE_DEFINITIONS YAML_CPP_DLL)
endif()
endif()

0 comments on commit e3fb83f

Please sign in to comment.