Skip to content

Commit 3ae278c

Browse files
mergify[bot]bjsowa
authored andcommitted
Don't link dl library when not needed (#28) (#30)
(cherry picked from commit 55de2e1) Co-authored-by: Błażej Sowa <[email protected]>
1 parent f73715c commit 3ae278c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ configure_file(
141141
"${PROJECT_BINARY_DIR}/include/rcutils/configuration_flags.h"
142142
)
143143

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

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

0 commit comments

Comments
 (0)