bugfix about AirDistribution
[profile/ivi/automotive-message-broker.git] / lib / CMakeLists.txt
1 set(amb_sources abstractpropertytype.cpp abstractroutingengine.cpp listplusplus.cpp abstractsink.cpp vehicleproperty.cpp abstractsource.cpp debugout.cpp timestamp.cpp uuidhelper.cpp mappropertytype.hpp
2         propertyinfo.hpp superptr.hpp asyncqueue.hpp ambpluginimpl.cpp ambplugin.h picojson.h jsonhelper.cpp)
3 set(amb_headers_install abstractpropertytype.h nullptr.h abstractroutingengine.h listplusplus.h abstractsink.h vehicleproperty.h debugout.h abstractsource.h timestamp.h uuidhelper.h mappropertytype.hpp
4         propertyinfo.hpp superptr.hpp asyncqueue.hpp ambplugin.h ambpluginimpl.h picojson.h jsonhelper.h valuequality.h)
5
6 add_library(amb SHARED ${amb_sources})
7
8 find_library(uuid_LIBRARY uuid DOC "Uuid libraries")
9 find_path(uuid_INCLUDE_DIR uuid/uuid.h DOC "Libtool headers")
10
11 if(uuid_LIBRARY)
12          message(STATUS "uuid found")
13 else(uuid_LIBRARY)
14          message(FATAL_ERROR "uuid missing.  please install uuid-dev")
15 endif(uuid_LIBRARY)
16
17 include_directories( ${include_dirs} ${uuid_INCLUDE_DIR})
18
19 target_link_libraries(amb ${libtool_LIBRARY} ${glib_LIBRARIES} ${gio_LIBRARIES} ${uuid_LIBRARY} ${json_LIBRARIES})
20 set_target_properties(amb PROPERTIES SOVERSION ${PROJECT_VERSION})
21
22 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/automotive-message-broker.pc.in ${CMAKE_CURRENT_BINARY_DIR}/automotive-message-broker.pc @ONLY)
23
24 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/automotive-message-broker.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
25
26 install (FILES ${amb_headers_install} DESTINATION ${INCLUDE_INSTALL_DIR}/amb COMPONENT Devel)
27
28 install (TARGETS amb LIBRARY DESTINATION ${LIB_INSTALL_DIR})
29
30 add_subdirectory(client)