summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-05 22:43:11 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-05 22:43:11 +0200
commit2561266c156a1f63ed85fe2865ac607507ae4cef (patch)
tree9fbc7cf5fb9a045e7bbf70ab07f9b5b4e518a782 /cmake
parent5f898aa52f81671cbc54beea19211c8a75e0962f (diff)
downloadfastd-2561266c156a1f63ed85fe2865ac607507ae4cef.tar
fastd-2561266c156a1f63ed85fe2865ac607507ae4cef.zip
Add status socket to get the current status as JSON
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config.cmake1
-rw-r--r--cmake/deps.cmake10
2 files changed, 11 insertions, 0 deletions
diff --git a/cmake/config.cmake b/cmake/config.cmake
index c1fd68b..8aa6549 100644
--- a/cmake/config.cmake
+++ b/cmake/config.cmake
@@ -44,6 +44,7 @@ set(WITH_CMDLINE_OPERATION TRUE CACHE BOOL "Include support for setting options
set(WITH_CMDLINE_COMMANDS TRUE CACHE BOOL "Include support for setting handler scripts (e.g. --on-up) on the command line")
set(WITH_DYNAMIC_PEERS TRUE CACHE BOOL "Include support for dynamic peers (using on-verify handlers)")
+set(WITH_STATUS_SOCKET TRUE CACHE BOOL "Include support for the status socket")
set(MAX_CONFIG_DEPTH 10 CACHE STRING "Maximum config include depth")
diff --git a/cmake/deps.cmake b/cmake/deps.cmake
index ea5a0a0..213b3d1 100644
--- a/cmake/deps.cmake
+++ b/cmake/deps.cmake
@@ -59,3 +59,13 @@ else(WITH_CAPABILITIES)
set(CAP_INCLUDE_DIR "")
set(CAP_LIBRARY "")
endif(WITH_CAPABILITIES)
+
+if(WITH_STATUS_SOCKET)
+ pkg_check_modules(JSONC json-c)
+else(WITH_STATUS_SOCKET)
+ set(JSONC_INCLUDE_DIRS "")
+ set(JSONC_CFLAGS_OTHER "")
+ set(JSONC_LIBRARY_DIRS "")
+ set(JSONC_LIBRARIES "")
+ set(JSONC_LDFLAGS_OTHER "")
+endif(WITH_STATUS_SOCKET)