diff --git a/.gitmodules b/.gitmodules index d9d73162..9a5b1fb5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,6 @@ [submodule "thirdparty/ecaludp/ecaludp"] path = thirdparty/ecaludp/ecaludp url = https://github.com/eclipse-ecal/ecaludp.git +[submodule "thirdparty/yaml-cpp/yaml-cpp"] + path = thirdparty/yaml-cpp/yaml-cpp + url = https://github.com/jbeder/yaml-cpp diff --git a/thirdparty/yaml-cpp/build-yaml-cpp.cmake b/thirdparty/yaml-cpp/build-yaml-cpp.cmake new file mode 100644 index 00000000..d2f89ba0 --- /dev/null +++ b/thirdparty/yaml-cpp/build-yaml-cpp.cmake @@ -0,0 +1,9 @@ +include_guard(GLOBAL) + +set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "My option" FORCE) +set(YAML_MSVC_SHARED_RT ON CACHE BOOL "My option" FORCE) +set(YAML_BUILD_SHARED_LIBS OFF CACHE BOOL "My option" FORCE) +set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "My option" FORCE) +set(YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "My option" FORCE) +add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/yaml-cpp thirdparty/yaml-cpp EXCLUDE_FROM_ALL SYSTEM) +set_property(TARGET yaml-cpp PROPERTY FOLDER thirdparty/yaml-cpp) diff --git a/thirdparty/yaml-cpp/compatibility-yaml-cpp.cmake b/thirdparty/yaml-cpp/compatibility-yaml-cpp.cmake new file mode 100644 index 00000000..4716ad52 --- /dev/null +++ b/thirdparty/yaml-cpp/compatibility-yaml-cpp.cmake @@ -0,0 +1,8 @@ +# Create targets to be compatible with yaml-cpp < 0.8.0 +macro(yaml_cpp_create_compatibility_targets) + if (NOT TARGET yaml-cpp::yaml-cpp AND TARGET yaml-cpp) + # ALIASing a imported non-global library requires CMake 3.18 so we do this + add_library(yaml-cpp::yaml-cpp INTERFACE IMPORTED) + target_link_libraries(yaml-cpp::yaml-cpp INTERFACE yaml-cpp) + endif() +endmacro() \ No newline at end of file diff --git a/thirdparty/yaml-cpp/yaml-cpp b/thirdparty/yaml-cpp/yaml-cpp new file mode 160000 index 00000000..9f7babc3 --- /dev/null +++ b/thirdparty/yaml-cpp/yaml-cpp @@ -0,0 +1 @@ +Subproject commit 9f7babc3ff000d1a8a567479c1b5d309658d8b7f