fixed compile error
[profile/ivi/automotive-message-broker.git] / plugins / murphyplugin / CMakeLists.txt
1 if(murphy_plugin)
2
3 include(CheckIncludeFiles)
4 include(FindPkgConfig)
5
6 include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${MURPHY_COMMON_INCLUDE_DIRS})
7
8 pkg_check_modules(MURPHY_COMMON REQUIRED murphy-common)
9
10 if(qtmainloop)
11 #    pkg_check_modules(MURPHY_QT REQUIRED murphy-qt)
12
13     set(include_dirs ${include_dirs} ${MURPHY_QT_INCLUDE_DIRS})
14         set(murphy_libraries ${murphy_libraries} ${MURPHY_QT_LIBRARIES})
15 else(qtmainloop)
16     pkg_check_modules(MURPHY_GLIB REQUIRED murphy-glib)
17
18     set(include_dirs ${include_dirs} ${MURPHY_GLIB_INCLUDE_DIRS})
19         set(murphy_libraries ${murphy_libraries} ${MURPHY_GLIB_LIBRARIES})
20 endif(qtmainloop)
21
22
23 set(murphysourceplugin_headers murphysource.h)
24 set(murphysourceplugin_sources murphysource.cpp)
25
26 link_directories(${CMAKE_CURRENT_BINARY_DIR}/lib ${MURPHY_COMMON_LIBRARY_DIRS})
27
28 add_library(murphysourceplugin MODULE ${murphysourceplugin_sources})
29 set_target_properties(murphysourceplugin PROPERTIES PREFIX "")
30 target_link_libraries(murphysourceplugin amb ${MURPHY_COMMON_LIBRARIES} -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries} ${murphy_libraries})
31
32 install(TARGETS murphysourceplugin LIBRARY DESTINATION lib${LIB_SUFFIX}/automotive-message-broker)
33
34 endif(murphy_plugin)