aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/radio/CMakeLists.txt
blob: d86ca2b55dd7619f6fb546941bc29ec0033739b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 ""
	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})

ENDIF(librtlsdr_FOUND)