summaryrefslogtreecommitdiff
path: root/enhanced-position-service/src/CMakeLists.txt
blob: ddc507ab294aa8f8266da8c5572dd45d84155f6d (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
###########################################################################
# @licence app begin@
# SPDX-License-Identifier: MPL-2.0
#
# Component Name: EnhancedPositionService
#
# Author: Marco Residori
#
# Copyright (C) 2014, XS Embedded GmbH
# 
# License:
# This Source Code Form is subject to the terms of the
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Update (2014/12/02) : Philippe Colliot <philippe.colliot@mpsa.com>,
#				PSA Peugeot Citroen
#		- introduce debug flag to disable verbosity
# @licence end@
###########################################################################

project(enhanced-position-service)
cmake_minimum_required(VERSION 2.6.0)

message(STATUS "ENHANCED-POSITION-SERVICE")
message(STATUS "WITH_DLT = ${WITH_DLT}")
message(STATUS "WITH_GPSD = ${WITH_GPSD}")
message(STATUS "WITH_REPLAYER = ${WITH_REPLAYER}")
message(STATUS "WITH_TESTS = ${WITH_TESTS}")
message(STATUS "WITH_DEBUG = ${WITH_DEBUG}")

find_package(PkgConfig REQUIRED)

pkg_check_modules(DBUS_CPP dbus-c++-1)

include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
include_directories(${gnss-service_INCLUDE_DIRS})
include_directories(${sensors-service_INCLUDE_DIRS})
include_directories(${enhanced-position-service_INCLUDE_DIRS})

link_directories(
    ${DBUS_CPP_LIBRARY_DIRS}
    ${gnss-service_LIBRARY_DIRS}
    ${sensors-service_LIBRARY_DIRS})

add_executable(enhanced-position-service
    main.cpp
    enhanced-position.cpp
    enhanced-position.h
    ${enhanced-position-service_INCLUDE_DIRS}/genivi-positioning-enhancedposition_adaptor.h
    position-feedback.cpp
    position-feedback.h
    ${enhanced-position-service_INCLUDE_DIRS}/genivi-positioning-positionfeedback_adaptor.h
    configuration.cpp
    configuration.h
    ${enhanced-position-service_INCLUDE_DIRS}/genivi-positioning-configuration_adaptor.h
)

set(LIBRARIES 
    ${DBUS_CPP_LIBRARIES}
    ${gnss-service_LIBRARIES}
    ${sensors-service_LIBRARIES}
)

if(WITH_DLT)
    add_definitions("-DDLT_ENABLED=1")
    set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/..")
    find_package(DLT REQUIRED)
    include_directories( ${DLT_INCLUDE_DIRS} )
    set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
endif()

if(WITH_DEBUG)
    add_definitions("-DDEBUG_ENABLED=1")
endif()

target_link_libraries(enhanced-position-service ${LIBRARIES})

message(STATUS "DBUS_CPP_LIBRARIES: " ${DBUS_CPP_LIBRARIES})
message(STATUS "GNSS_SERVICE_LIBRARIES: " ${gnss-service_LIBRARIES})
message(STATUS "SENSORS_SERVICE_LIBRARIES: " ${sensors-service_LIBRARIES})