blob: 3df65996f491af224a6dd941aa5715931389de4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
diff --git a/cmake/modules/FindTinyXML2.cmake b/cmake/modules/FindTinyXML2.cmake
index 24aa98a..4e2188e 100644
--- a/cmake/modules/FindTinyXML2.cmake
+++ b/cmake/modules/FindTinyXML2.cmake
@@ -7,10 +7,10 @@ option(TINYXML2_FROM_SOURCE "Integrate TinyXML2 source code inside Fast RTPS" OF
find_package(TinyXML2 CONFIG QUIET)
if(TinyXML2_FOUND)
message(STATUS "Found TinyXML2: ${TinyXML2_DIR}")
- if(NOT TINYXML2_LIBRARY AND TARGET tinyxml2)
+ if(NOT TINYXML2_LIBRARY AND TARGET tinyxml2::tinyxml2)
# in this case, we're probably using TinyXML2 version 5.0.0 or greater
# in which case tinyxml2 is an exported target and we should use that
- set(TINYXML2_LIBRARY tinyxml2)
+ set(TINYXML2_LIBRARY tinyxml2::tinyxml2)
endif()
else()
if(THIRDPARTY)
|