blob: 418bf9d11fbda9da81fa21f0794c68c77715a648 (
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
|
###########################################################################
# @licence app begin@
# SPDX-License-Identifier: MPL-2.0
#
# Component Name: EnhancedPositionService
#
# Author: Thomas Bader
#
# Copyright (C) 2012, BMW Car IT 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/.
#
# List of changes:
#
# 15/6/2014, Philippe Colliot, migrate to Qt5
#
# @licence end@
###########################################################################
cmake_minimum_required(VERSION 2.8.11)
project(test-client)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Tell CMake where are Qt packages
set(CMAKE_PREFIX_PATH $ENV{QTDIR})
# Tell CMake what Qt components are used
find_package(Qt5Core)
find_package(Qt5DBus)
get_target_property(QtCore_location Qt5::Core LOCATION)
get_target_property(QtDBus_location Qt5::DBus LOCATION)
include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5DBus_EXECUTABLE_COMPILE_FLAGS}")
message(STATUS "ENHANCED-POSITION-SERVICE TEST-APPLICATION")
message(STATUS "WITH_DLT = ${WITH_DLT}")
message(STATUS "WITH_GPSD = ${WITH_GPSD}")
message(STATUS "WITH_REPLAYER = ${WITH_REPLAYER}")
set(LIBRARIES
${Qt5Core_LIBRARIES}
${Qt5DBus_LIBRARIES}
)
add_library(ClientEnhpos STATIC
demoif.cpp
testclient.cpp
confif.cpp
ConfigurationClient.cpp
../src/genivi-version.cpp
signalhelper.cpp
)
# Specify the paths in which the linker should search for libraries.
# The command will apply only to targets created after it is called.
link_directories(${QT_LIBRARY_DIR})
# Tell CMake to create the test-client executable
add_executable(test-client main-client.cpp)
target_link_libraries(test-client
ClientEnhpos
${LIBRARIES}
)
|