Skip to content

Commit 20e7a11

Browse files
committed
CMake: add pugixml::pugixml alias for pugixml < 1.11
1 parent 5198054 commit 20e7a11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ if(LSL_BUNDLED_PUGIXML)
110110
else()
111111
message(STATUS "Using system pugixml")
112112
find_package(pugixml REQUIRED)
113-
target_link_libraries(lslobj PRIVATE pugixml)
113+
if(NOT TARGET pugixml::pugixml)
114+
add_library(pugixml::pugixml ALIAS pugixml)
115+
endif()
116+
target_link_libraries(lslobj PUBLIC pugixml::pugixml)
114117
endif()
115118

116119
# try to find out which revision is currently checked out

0 commit comments

Comments
 (0)