summaryrefslogtreecommitdiff
path: root/src/lib/CMakeLists.txt
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-09-18 07:39:47 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-09-18 07:39:47 +0000
commitbf52441ac2844b3e2517a5c98e110f32372f0876 (patch)
tree73bc28244ef03c23e2ba5e79ae843de3df3fe727 /src/lib/CMakeLists.txt
parent60ffacc12ab73752cb6ef736f2b41022c984785c (diff)
parentf86502516b2a069954d0529d8b43593ece7360eb (diff)
downloadouroboros-bf52441ac2844b3e2517a5c98e110f32372f0876.tar.gz
ouroboros-bf52441ac2844b3e2517a5c98e110f32372f0876.zip
Merged in dstaesse/ouroboros/be-fuse (pull request #594)
lib: Provide RIB API to export internals via fuse
Diffstat (limited to 'src/lib/CMakeLists.txt')
-rw-r--r--src/lib/CMakeLists.txt25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index fd7ece83..26cecb44 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -37,10 +37,30 @@ if (HAVE_ROBUST_MUTEX)
set(HAVE_ROBUST_MUTEX TRUE)
else ()
message(STATUS "Robust mutex support disabled by user")
- set(HAVE_ROBUST_MUTEX FALSE)
endif ()
endif ()
+find_library(FUSE_LIBRARIES fuse QUIET)
+if (FUSE_LIBRARIES)
+ #FIXME: Check for version >= 2.6
+ set(DISABLE_FUSE FALSE CACHE BOOL "Disable FUSE support")
+ if (NOT DISABLE_FUSE)
+ message(STATUS "FUSE support enabled")
+ set(FUSE_PREFIX "/tmp/ouroboros" CACHE STRING
+ "Mountpoint for RIB filesystem")
+ set(HAVE_FUSE TRUE CACHE INTERNAL "")
+ else ()
+ message(STATUS "FUSE support disabled by user")
+ endif ()
+endif ()
+
+if (NOT HAVE_FUSE)
+ set(FUSE_LIBRARIES "")
+ set(FUSE_INCLUDE_DIR "")
+endif ()
+
+mark_as_advanced(FUSE_LIBRARIES)
+
find_library(LIBGCRYPT_LIBRARIES gcrypt QUIET)
if (LIBGCRYPT_LIBRARIES)
find_path(LIBGCRYPT_INCLUDE_DIR gcrypt.h
@@ -163,6 +183,7 @@ set(SOURCE_FILES
qos.c
qoscube.c
random.c
+ rib.c
rq.c
sha3.c
shm_flow_set.c
@@ -188,7 +209,7 @@ endif (CMAKE_BUILD_TYPE MATCHES Debug)
target_link_libraries(ouroboros ${LIBRT_LIBRARIES}
${LIBPTHREAD_LIBRARIES} ${PROTOBUF_C_LIBRARY} ${OPENSSL_LIBRARIES}
- ${LIBGCRYPT_LIBRARIES})
+ ${LIBGCRYPT_LIBRARIES} ${FUSE_LIBRARIES})
install(TARGETS ouroboros LIBRARY DESTINATION usr/lib)