aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/radio
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-18 17:29:26 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-18 17:29:26 +0200
commit9481b4f2960c560ec8297bdc37d8014230072a5c (patch)
treeb076d389746ae8e33f68855146fa5c58318764c4 /plugins/radio
parentceb2e567b5f26ff148fbc0e9526f7e7e99464000 (diff)
improves the build system
Change-Id: Idad84e88cd8c21d111ce7ed44340f6d2b0fccb37 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'plugins/radio')
-rw-r--r--plugins/radio/CMakeLists.txt13
-rw-r--r--plugins/radio/export.map1
2 files changed, 11 insertions, 3 deletions
diff --git a/plugins/radio/CMakeLists.txt b/plugins/radio/CMakeLists.txt
index 04d0fa21..d86ca2b5 100644
--- a/plugins/radio/CMakeLists.txt
+++ b/plugins/radio/CMakeLists.txt
@@ -1,9 +1,16 @@
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(librtlsdr librtlsdr>=0.5.0)
+
IF(librtlsdr_FOUND)
+ MESSAGE(STATUS "librtlsdr found ; will compile Radio plugin... (PLUGIN)")
+ 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 "")
- TARGET_LINK_LIBRARIES(radio-api ${link_libraries})
- INCLUDE_DIRECTORIES(${include_dirs})
+ 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})
INSTALL(TARGETS radio-api
LIBRARY DESTINATION ${plugin_install_dir})
diff --git a/plugins/radio/export.map b/plugins/radio/export.map
new file mode 100644
index 00000000..e2da85ca
--- /dev/null
+++ b/plugins/radio/export.map
@@ -0,0 +1 @@
+{ global: pluginAfbV1Register; local: *; };