diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index c7fdecbe8..3fc9fbdc2 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -36,8 +36,13 @@ set(LIBRARIES stdc++ ) +# For shmem_unlink +if(UNIX AND NOT APPLE) + list(APPEND LIBRARIES "rt") +endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL GNU) - list(APPEND LIBRARIES "-lstdc++fs") + list(APPEND LIBRARIES "-lstdc++fs") endif() set(LIB_SRC diff --git a/lib/nodes/CMakeLists.txt b/lib/nodes/CMakeLists.txt index ab17ad430..4c2d4050b 100644 --- a/lib/nodes/CMakeLists.txt +++ b/lib/nodes/CMakeLists.txt @@ -69,10 +69,6 @@ endif() # Enable shared memory node-type if(WITH_NODE_SHMEM) list(APPEND NODE_SRC shmem.cpp) - - if(CMAKE_SUSTEM_NAME STREQUAL Linux) - list(APPEND LIBRARIES rt) - endif() endif() # Enable IEC61850 node-types when libiec61850 is available