-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
132 lines (115 loc) · 5.65 KB
/
CMakeLists.txt
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Set the minimum required CMake version
cmake_minimum_required(VERSION 3.15)
# Define the project name as DESproject
project(DESproject)
# Enable auto UI generation, MOC, and RCC for Qt
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
# Set C++ standard to C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set(CMAKE_PREFIX_PATH "/opt/Qt/5.15.0/gcc_64")
# Append C++ compiler flags, including -pthread and -std=c++0x
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++0x")
# Find required Qt5 components (Core, Quick, Gui, Multimedia)
find_package(Qt5 COMPONENTS Core Quick Gui Multimedia REQUIRED)
# Find Python libraries
find_package(PythonLibs REQUIRED)
# Include Python include directories
include_directories(${PYTHON_INCLUDE_DIRS})
# Configure include and link directories
include_directories(
src-gen-desproject
~/build-commonapi/capicxx-core-runtime/include
~/build-commonapi/capicxx-someip-runtime/include
~/build-commonapi/vsomeip/interface
)
link_directories(
~/build-commonapi/capicxx-core-runtime/build
~/build-commonapi/capicxx-someip-runtime/build
~/build-commonapi/vsomeip/build
)
# Create executables and link libraries for the CANSender, PiracerSender, PiracerController, IPCManager, InstrumentCluster, HeadUnit and PiracerSignal targets
add_executable(CANSender
src/CANSender/CANSender.cpp
src/CANSender/ReadCANThread.c
src/CANSender/CANBuffer.c
src/CANSender/SendSomeipThread.cpp
src/CANSender/CANSenderStubImpl.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/CANSenderSomeIPStubAdapter.cpp
src-gen-desproject/v1/commonapi/CANSenderSomeIPDeployment.cpp
)
target_link_libraries(CANSender CommonAPI CommonAPI-SomeIP vsomeip3)
add_executable(PiracerSender
src/PiracerSender/PiracerSender.cpp
src/PiracerSender/PiracerClass.cpp
src/PiracerSender/PiracerSenderStubImpl.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/PiracerSenderSomeIPStubAdapter.cpp
src-gen-desproject/v1/commonapi/PiracerSenderSomeIPDeployment.cpp
)
target_link_libraries(PiracerSender ${PYTHON_LIBRARIES} CommonAPI CommonAPI-SomeIP vsomeip3)
add_executable(PiracerController
src/PiracerController/PiracerController.cpp
src/PiracerController/PiracerControllerStubImpl.cpp
src/PiracerController/ControllerClass.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/PiracerControllerSomeIPStubAdapter.cpp
src-gen-desproject/v1/commonapi/PiracerControllerSomeIPDeployment.cpp
)
target_link_libraries(PiracerController ${PYTHON_LIBRARIES} CommonAPI CommonAPI-SomeIP vsomeip3)
add_executable(IPCManager
src/IPCManager/IPCManager.cpp
src/IPCManager/IPCManagerStubImpl.cpp
src/IPCManager/IPCManagerSenderClass.cpp
src/IPCManager/PiracerClass.cpp
src-gen-desproject/v1/commonapi/CANSenderSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/CANSenderSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/PiracerSenderSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/PiracerSenderSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/PiracerControllerSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/PiracerControllerSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/HeadUnitSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/HeadUnitSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPStubAdapter.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp
)
target_link_libraries(IPCManager ${PYTHON_LIBRARIES} CommonAPI CommonAPI-SomeIP vsomeip3)
add_executable(InstrumentCluster
src/InstrumentCluster/InstrumentCluster.cpp
src/InstrumentCluster/InstrumentClusterStubImpl.cpp
src/InstrumentCluster/InstrumentClusterSenderClass.cpp
src/InstrumentCluster/InstrumentClusterQtClass.cpp
src/InstrumentCluster/qml.qrc
src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPStubAdapter.cpp
src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPDeployment.cpp
)
target_compile_definitions(InstrumentCluster
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(InstrumentCluster
PRIVATE Qt5::Core Qt5::Quick Qt5::Gui CommonAPI CommonAPI-SomeIP vsomeip3)
add_executable(HeadUnit
src/HeadUnit/HeadUnit.cpp
src/HeadUnit/HeadUnitStubImpl.cpp
src/HeadUnit/HeadUnitQtClass.cpp
src/HeadUnit/HeadUnitSenderClass.cpp
src/HeadUnit/qml.qrc
src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp
src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp
src-gen-desproject/v1/commonapi/HeadUnitSomeIPStubAdapter.cpp
src-gen-desproject/v1/commonapi/HeadUnitSomeIPDeployment.cpp
)
target_compile_definitions(HeadUnit
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(HeadUnit
PRIVATE Qt5::Core Qt5::Quick Qt5::Gui Qt5::Multimedia CommonAPI CommonAPI-SomeIP vsomeip3)