X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CMakeLists.txt;h=a3ab4c37fc4702f0077a83fd32544b7dd5471b75;hb=3f13bc8ca416e6318bcbd199113a2cd69b11b2b6;hp=4e9314d1e9410701f1fa7373923f37b67f5cfedd;hpb=e7c246a1b0d30b8156c7033061a61ecb5d2bdfc8;p=src%2Fapp-framework-binder.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e9314d1..a3ab4c37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ PROJECT(afb-daemon C) -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) SET(CMAKE_BUILD_TYPE, Debug) SET(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -35,11 +35,14 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES Debug) INCLUDE(FindPkgConfig) PKG_CHECK_MODULES(json-c REQUIRED json-c) PKG_CHECK_MODULES(libmicrohttpd REQUIRED libmicrohttpd) +PKG_CHECK_MODULES(uuid REQUIRED uuid) # Optional plugin dependencies +PKG_CHECK_MODULES(alsa alsa) PKG_CHECK_MODULES(librtlsdr librtlsdr>=0.5.0) -PKG_CHECK_MODULES(uuid REQUIRED uuid) - +IF(alsa_FOUND) + MESSAGE(STATUS "ALSA found ; will compile Audio plugin... (PLUGIN)") +ENDIF(alsa_FOUND) IF(librtlsdr_FOUND) MESSAGE(STATUS "librtlsdr found ; will compile Radio plugin... (PLUGIN)") ENDIF(librtlsdr_FOUND) @@ -47,7 +50,14 @@ ENDIF(librtlsdr_FOUND) INCLUDE(FindThreads) FIND_PACKAGE(Threads) -SET(include_dirs ${INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include ${json-c_INCLUDE_DIRS} ${libmicrohttpd_INCLUDE_DIRS} ${librtlsdr_INCLUDE_DIRS}) -SET(link_libraries ${json-c_LIBRARIES} ${libmicrohttpd_LIBRARIES} ${uuid_LIBRARIES} ${librtlsdr_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${libefence_LIBRARIES} -lmagic -lm) +SET(include_dirs ${INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include ${json-c_INCLUDE_DIRS} ${libmicrohttpd_INCLUDE_DIRS} ${uuid_INCLUDE_DIRS} ${alsa_INCLUDE_DIRS} ${librtlsdr_INCLUDE_DIRS}) +SET(link_libraries ${json-c_LIBRARIES} ${libmicrohttpd_LIBRARIES} ${uuid_LIBRARIES} ${alsa_LIBRARIES} ${librtlsdr_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${libefence_LIBRARIES} -lmagic -lm) ADD_SUBDIRECTORY(src) +ADD_SUBDIRECTORY(plugins) + +ADD_EXECUTABLE(afb-daemon $ $) +TARGET_LINK_LIBRARIES(afb-daemon ${link_libraries}) + +INSTALL(TARGETS afb-daemon + RUNTIME DESTINATION bin)