diff options
Diffstat (limited to 'bindings/radio/CMakeLists.txt')
-rw-r--r-- | bindings/radio/CMakeLists.txt | 17 |
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) |