summaryrefslogtreecommitdiffstats
path: root/plugins/radio/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/radio/CMakeLists.txt')
-rw-r--r--plugins/radio/CMakeLists.txt13
1 files changed, 10 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})