aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-10 17:32:17 +0100
committerManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-11 09:32:42 +0100
commit335eeec7aaf944d66cac87b5bb3f64f8fc7e385e (patch)
treeb73eaf3e76cd3075421cc1f129b201ea25cea664 /CMakeLists.txt
parent0608d9d3e98a9ed7a08df21401907b4e3a5e0f67 (diff)
Add Radio API plugin
Add Radio API plugin source code, build with CMake. Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7805884..b297cbfc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,8 +35,17 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(json-c REQUIRED json-c)
PKG_CHECK_MODULES(libmicrohttpd REQUIRED libmicrohttpd)
+# Optional plugin dependencies
+PKG_CHECK_MODULES(librtlsdr librtlsdr>=0.5.0)
-SET(include_dirs ${INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include ${json-c_INCLUDE_DIRS} ${libmicrohttpd_INCLUDE_DIRS})
-SET(link_libraries ${json-c_LIBRARIES} ${libmicrohttpd_LIBRARIES} ${libefence_LIBRARIES} -lmagic)
+IF(librtlsdr_FOUND)
+ MESSAGE(STATUS "librtlsdr found ; will compile Radio plugin... (PLUGIN)")
+ENDIF(librtlsdr_FOUND)
+
+INCLUDE(FindThreads)
+FIND_PACKAGE(Threads)
+
+SET(include_dirs ${INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include ${json-c_INCLUDE_DIRS} ${libmicrohttpd_INCLUDE_DIRS} ${librtlsdr_INCLUDE_DIRS})
+SET(link_libraries ${json-c_LIBRARIES} ${libmicrohttpd_LIBRARIES} ${librtlsdr_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${libefence_LIBRARIES} -lmagic -lm)
ADD_SUBDIRECTORY(src)