Removed unnecessary build dependencies.
[profile/ivi/ico-vic-amb-plugin.git] / CMakeLists.txt
1 project(ico-vic-amb-plugin)
2 cmake_minimum_required(VERSION 2.8)
3
4 set(CMAKE_BUILD_TYPE, Debug)
5
6 include(FindPkgConfig)
7
8 set(PROJECT_NAME "ico-vic-amb-plugin")
9 set(PROJECT_VERSION "0.1.0")
10
11 set (DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/automotive-message-broker/${PROJECT_NAME}" CACHE PATH "The directory the docs will be installed to")
12 set (CONF_INSTALL_DIR "/etc/ambd" CACHE PATH "The directory the config will be installed to")
13
14 add_definitions(-DPROJECT_VERSION="${PROJECT_VERSION}")
15 add_definitions(-DPROJECT_NAME="${PROJECT_NAME}")
16 add_definitions(-DLATER1024)
17
18 set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
19 set (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE STRING "Directory where lib will install")
20
21 include (CMakeForceCompiler)
22 option(ENABLE_ICECC "Enable icecc checking, for distributed compilation" OFF)
23
24 if (ENABLE_ICECC)
25    find_program(ICECC icecc)
26     if (ICECC)
27         message(STATUS "icecc will be used for distributed compiling")
28         cmake_force_cxx_compiler(${ICECC} icecc)
29     else(ICECC)
30         message(STATUS "Not using icecc")
31     endif(ICECC)
32 endif(ENABLE_ICECC)
33
34 find_package(Boost REQUIRED)
35
36 pkg_check_modules(glib REQUIRED glib-2.0 gobject-2.0)
37 pkg_check_modules(gio REQUIRED gio-2.0)
38 pkg_check_modules(json REQUIRED json)
39 pkg_check_modules(ambd REQUIRED automotive-message-broker)
40 pkg_check_modules(elementary REQUIRED elementary)
41 pkg_check_modules(appcore-efl REQUIRED appcore-efl)
42
43 set(include_dirs ${libtool_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${json_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/lib ${ambd_INCLUDE_DIRS})
44 #set(link_libraries ${ambd_LIBRARIES} ${libtool_LIBRARY} ${json_LIBRARIES} -L${CMAKE_CURRENT_BINARY_DIR}/lib)
45 set(link_libraries -lamb ${libtool_LIBRARY} ${json_LIBRARIES} -L${CMAKE_CURRENT_BINARY_DIR}/lib)
46
47 set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
48 add_custom_target(dist COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
49
50 add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
51
52 set(ico-vic-amb-plugin_docs README)
53 install (FILES ${ico-vic-amb-plugin_docs} DESTINATION ${DOC_INSTALL_DIR})
54
55 add_subdirectory(src)
56 add_subdirectory(tests)
57 add_subdirectory(tool)