Skip to content

Commit d3f0889

Browse files
mergify[bot]bjsowa
authored andcommitted
Don't link dl library when not needed (#28) (#29)
(cherry picked from commit 55de2e1) Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
1 parent a228b2a commit d3f0889

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ configure_file(
142142
"${PROJECT_BINARY_DIR}/include/rcutils/configuration_flags.h"
143143
)
144144

145-
target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS})
145+
if(NOT RCUTILS_NO_FILESYSTEM)
146+
target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS})
147+
endif()
146148

147149
# Needed if pthread is used for thread local storage.
148150
if(IOS AND IOS_SDK_VERSION LESS 10.0)

0 commit comments

Comments
 (0)