X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CMakeLists.txt;h=4fba65e39e00b02bbf8bdbbfc6b79f772c4c6868;hb=98f5843474dcec55827279b6f42007341c171ae0;hp=a3ab4c37fc4702f0077a83fd32544b7dd5471b75;hpb=03bebc12f0fd5006a72e430084146a36d2db7c8d;p=src%2Fapp-framework-binder.git diff --git a/CMakeLists.txt b/CMakeLists.txt index a3ab4c37..4fba65e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ SET(PROJECT_VERSION "0.1") INCLUDE(FindPkgConfig) INCLUDE(CheckIncludeFiles) INCLUDE(CheckLibraryExists) +INCLUDE(GNUInstallDirs) CHECK_INCLUDE_FILES(magic.h HAVE_MAGIC_H) CHECK_LIBRARY_EXISTS(magic magic_load "" HAVE_LIBMAGIC_SO) @@ -51,12 +52,16 @@ INCLUDE(FindThreads) FIND_PACKAGE(Threads) 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) +SET(link_libraries ${json-c_LIBRARIES} ${libmicrohttpd_LIBRARIES} ${uuid_LIBRARIES} ${alsa_LIBRARIES} ${librtlsdr_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${libefence_LIBRARIES} -lmagic -lm -ldl) +SET(plugin_install_dir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/afb) + +ADD_DEFINITIONS(-DPLUGIN_INSTALL_DIR="${plugin_install_dir}") ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(plugins) -ADD_EXECUTABLE(afb-daemon $ $) +ADD_EXECUTABLE(afb-daemon $) +INCLUDE_DIRECTORIES(${include_dirs}) TARGET_LINK_LIBRARIES(afb-daemon ${link_libraries}) INSTALL(TARGETS afb-daemon