From a693e7b5db5d60d1efa8ed85eb125130da998bb8 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Wed, 24 Oct 2018 15:43:34 +0200 Subject: [PATCH] cmake: only try building socket.c if libnl is present. (see #208) --- lib/nodes/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nodes/CMakeLists.txt b/lib/nodes/CMakeLists.txt index 123523853..b735a6e8e 100644 --- a/lib/nodes/CMakeLists.txt +++ b/lib/nodes/CMakeLists.txt @@ -23,7 +23,7 @@ set(NODE_SRC influxdb.c stats.c - signal_generator.c + signal_generator.c ) if(LIBNL3_ROUTE_FOUND) @@ -31,11 +31,11 @@ if(LIBNL3_ROUTE_FOUND) list(APPEND INCLUDE_DIRS LIBNL3_ROUTE_INCLUDE_DIRS) endif() -if(WITH_IO) +if(LIBNL3_ROUTE_FOUND AND WITH_IO) list(APPEND NODE_SRC test_rtt.c file.c - socket.c + socket.c ) endif() @@ -49,7 +49,7 @@ endif() # Enable shared memory node-type if(HAS_SEMAPHORE AND HAS_MMAN) list(APPEND NODE_SRC shmem.c) - + if(CMAKE_SUSTEM_NAME STREQUAL Linux) list(APPEND LIBRARIES rt) endif()