summaryrefslogtreecommitdiffstats
path: root/bindings/radio/CMakeLists.txt
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-06-23 20:34:57 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-06-23 20:42:57 +0200
commit7059e59cddc1c81321639875636e88895bc14309 (patch)
tree2e857745ae2dd18814bdfe2d6e3806151a51a43e /bindings/radio/CMakeLists.txt
parentef908d903929988ad01f9df94415fc9c3ddebcac (diff)
vocabulary: moving from 'plugin' to 'binding'
Change-Id: Ic9e118df2bede1fefbb591f8ae7887266b7324ca Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'bindings/radio/CMakeLists.txt')
-rw-r--r--bindings/radio/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/bindings/radio/CMakeLists.txt b/bindings/radio/CMakeLists.txt
new file mode 100644
index 00000000..4df7adb2
--- /dev/null
+++ b/bindings/radio/CMakeLists.txt
@@ -0,0 +1,17 @@
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(librtlsdr librtlsdr>=0.5.0)
+
+IF(librtlsdr_FOUND)
+
+ MESSAGE(STATUS "librtlsdr found ; will compile Radio binding... (binding)")
+ INCLUDE_DIRECTORIES(${include_dirs} ${librtlsdr_INCLUDE_DIRS})
+ ADD_LIBRARY(radio-api MODULE radio-api.c radio-rtlsdr.c)
+ SET_TARGET_PROPERTIES(radio-api PROPERTIES
+ PREFIX ""
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export.map"
+ )
+ TARGET_LINK_LIBRARIES(radio-api ${link_libraries} ${librtlsdr_LIBRARIES} -lm)
+ INSTALL(TARGETS radio-api
+ LIBRARY DESTINATION ${binding_install_dir})
+
+ENDIF(librtlsdr_FOUND)