-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac9b73e
commit 2f4baaf
Showing
1 changed file
with
3 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,28 +9,12 @@ Signed-off-by: Silvio Traversaro <[email protected]> | |
1 file changed, 11 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/yaml_cpp_vendor-extras.cmake.in b/yaml_cpp_vendor-extras.cmake.in | ||
index d0f9766..d3bf920 100644 | ||
index deac98c..48eb4a9 100644 | ||
--- a/yaml_cpp_vendor-extras.cmake.in | ||
+++ b/yaml_cpp_vendor-extras.cmake.in | ||
@@ -11,10 +11,15 @@ find_package(yaml-cpp REQUIRED) | ||
@@ -15,4 +15,4 @@ endif() | ||
set(yaml_cpp_vendor_LIBRARIES ${YAML_CPP_LIBRARIES}) | ||
set(yaml_cpp_vendor_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR}) | ||
|
||
-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) | ||
+# 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() | ||
+list(APPEND yaml_cpp_vendor_TARGETS yaml-cpp::yaml-cpp) |