Added new examples which can be manually build against DLt library.
[profile/ivi/dlt-daemon.git] / examples / example1 / CMakeLists.txt
1 #######
2 # Dlt - Diagnostic Log and Trace
3 # @licence make begin@
4 #
5 # Copyright (C) 2011-2014, BMW AG - Alexander Wenzel <alexander.aw.wenzel@bmw.de>
6
7 # Contributions are licensed to the GENIVI Alliance under one or more
8 # Contribution License Agreements.
9
10 # This Source Code Form is subject to the terms of the
11 # Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed with
12 # this file, You can obtain one at http://mozilla.org/MPL/2.0/.
13 #
14 # @licence end@
15 ########
16
17 #
18 # DLT example implementation
19 #
20
21 cmake_minimum_required( VERSION 2.6 )
22 project( automotive-dlt-example1 )
23
24 #
25 # set prefix
26 #
27
28 set( CMAKE_INSTALL_PREFIX "/usr" )
29
30 #
31 # find dependency packages
32 #
33
34 find_package(PkgConfig)
35 pkg_check_modules(DLT REQUIRED automotive-dlt)
36
37 #
38 # include directories
39 #
40
41 include_directories(
42     ${DLT_INCLUDE_DIRS}
43 )
44
45 #
46 # build project
47 #
48
49 set(dlt_example1_SRCS example1.c)
50 add_executable(dlt-example1 ${dlt_example1_SRCS})
51 target_link_libraries(dlt-example1 ${DLT_LIBRARIES})
52 set_target_properties(dlt-example1 PROPERTIES LINKER_LANGUAGE C)
53
54 install(TARGETS dlt-example1
55         RUNTIME DESTINATION bin
56         COMPONENT base)