blob: 6d392eeda1a4b88f74056d2c624a382c78096d8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
cmake_minimum_required(VERSION 2.8)
set( CMAKE_VERBOSE_MAKEFILE on )
# to install plugin into /usr instead of /usr/local
set (CMAKE_INSTALL_PREFIX /usr)
IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
message("debug mode")
ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)
IF(CMAKE_BUILD_TYPE MATCHES RELEASE)
message("release mode")
add_definitions(-D_LOGGER_NO_LOG)
ENDIF(CMAKE_BUILD_TYPE MATCHES RELEASE)
include(FindPkgConfig)
find_package(Boost REQUIRED)
pkg_check_modules(glib REQUIRED glib-2.0)
pkg_check_modules(json REQUIRED json)
add_definitions(-std=gnu++0x -fPIC -fPIE)
pkg_check_modules( amb REQUIRED automotive-message-broker )
pkg_check_modules( amb-plugins-common REQUIRED amb-plugins-common )
include_directories(${include_dirs} ${amb-plugins-common_INCLUDE_DIRS} ${amb_INCLUDE_DIRS} ${glib_INCLUDE_DIRS} ${gio_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${json_INCLUDE_DIRS} )
set(ambtmpl_plugin_headers ambtmpl_plugin.h ambtmpl_cansignals.h ambtmpl_cansignal.h)
set(ambtmpl_plugin_sources ambtmpl_plugin.cpp ambtmpl_cansignal.cpp)
if(ivipoc_tests)
#########################################
# ivipoc_tests START
#########################################
#find CppUTest headers ( CppUTest/CommandLineTestRunner.h ):
find_path(cpputest_INCLUDE_DIR CppUTest/CommandLineTestRunner.h PATHS $ENV{CPPUTEST_HOME}/include DOC "CppUTest headers")
include_directories(${include_dirs} ${cpputest_INCLUDE_DIR})
#find libCppUTestExt.a (and libCppUTest.a) library:
find_library(CppUTest_LIBRARY CppUTest PATHS $ENV{CPPUTEST_HOME}/lib DOC "CppUTest library")
find_library(CppUTestExt_LIBRARY CppUTestExt PATHS $ENV{CPPUTEST_HOME}/lib DOC "CppUTestExt library")
# test definitions
add_definitions(-DUNIT_TESTS -fprofile-arcs -ftest-coverage)
# test link libs
set(link_libraries gcov ${CppUTest_LIBRARY} ${CppUTestExt_LIBRARY})
# test sources
add_subdirectory(test)
#########################################
# ivipoc_tests END
#########################################
endif(ivipoc_tests)
add_library(ambtmpl_plugin MODULE ${ambtmpl_plugin_sources} ${ambtmpl_plugin_headers})
set_target_properties(ambtmpl_plugin PROPERTIES PREFIX "")
target_link_libraries(ambtmpl_plugin ${link_libraries} ${libamb_LIBRARY} ${amb_LIBRARIES} ${amb-plugins-common_LIBRARIES})
install(TARGETS ambtmpl_plugin LIBRARY DESTINATION lib/automotive-message-broker)
############################################################################################################################################
|