diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ec9265b..2e7c85e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,9 @@ configure_file( "${PROJECT_BINARY_DIR}/include/rcutils/configuration_flags.h" ) -target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS}) +if(NOT RCUTILS_NO_FILESYSTEM) + target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS}) +endif() # Needed if pthread is used for thread local storage. if(IOS AND IOS_SDK_VERSION LESS 10.0)