-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
122 lines (108 loc) · 3.67 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
cmake_minimum_required(VERSION 3.10)
project(mur_ide)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_REQUIRED_FLAGS -std=c++17)
find_package(SDL2 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Threads)
find_package(Qt6 REQUIRED COMPONENTS
Core
Widgets
WebSockets
WebEngineQuick
PrintSupport
Qml
Quick
QuickControls2
Gui
Concurrent)
add_executable(${PROJECT_NAME} WIN32 resources/icon.rc)
file(GLOB QJoystick "${QJoy}/src/*.cpp" "${QJoy}/src/*.h"
"${QJoy}/src/QJoysticks/*.cpp" "${QJoy}/src/QJoysticks/*.h"
)
target_sources(${PROJECT_NAME}
PRIVATE sources/main.cpp
PRIVATE sources/Application.cpp
PRIVATE sources/Application.hxx
PRIVATE resources/resources.qrc
PRIVATE sources/EditorController.cpp
PRIVATE sources/EditorController.hxx
PRIVATE sources/EditorErrors.cpp
PRIVATE sources/EditorErrors.hxx
PRIVATE sources/EditorHighlighter.cpp
PRIVATE sources/EditorHighlighter.hxx
PRIVATE sources/EditorSearch.cpp
PRIVATE sources/EditorSearch.hxx
PRIVATE sources/EditorSelection.cpp
PRIVATE sources/EditorSelection.hxx
PRIVATE sources/EditorUtils.cpp
PRIVATE sources/EditorUtils.hxx
PRIVATE sources/QmlUtils.cpp
PRIVATE sources/QmlUtils.hxx
PRIVATE sources/TextIO.cpp
PRIVATE sources/TextIO.hxx
PRIVATE sources/ApplicationController.cpp
PRIVATE sources/ApplicationController.hxx
PRIVATE sources/ApplicationMenu.cpp
PRIVATE sources/ApplicationMenu.hxx
PRIVATE sources/NetworkController.cpp
PRIVATE sources/NetworkController.hxx
PRIVATE sources/SimulatorController.cpp
PRIVATE sources/SimulatorController.hxx
PRIVATE sources/ApplicationLogger.cpp
PRIVATE sources/ApplicationLogger.hxx
PRIVATE sources/LocalScriptsController.hxx
PRIVATE sources/JsonUtils.cpp
PRIVATE sources/JsonUtils.hxx
PRIVATE sources/RemoteController.cpp
PRIVATE sources/RemoteController.hxx
PRIVATE sources/QmlImageItem.cpp
PRIVATE sources/QmlImageItem.hxx
PRIVATE sources/EditorIndenter.cpp
PRIVATE sources/EditorIndenter.hxx
PRIVATE sources/SettingsController.cpp
PRIVATE sources/SettingsController.hxx
PRIVATE sources/UpdateController.cpp
PRIVATE sources/UpdateController.hxx
PRIVATE sources/EditorHints.cpp
PRIVATE sources/EditorHints.hxx
PRIVATE sources/HintBase.cpp
PRIVATE sources/HintBase.hxx
PRIVATE sources/ApiTokenDialog.cpp
PRIVATE sources/ApiTokenDialog.hxx
PRIVATE sources/Joystick.cpp
PRIVATE sources/Joystick.hxx
PRIVATE ${QJoystick}
)
if (WIN32)
target_sources(${PROJECT_NAME}
PRIVATE sources/LocalScriptsController_win32.cpp)
else ()
target_sources(${PROJECT_NAME}
PRIVATE sources/LocalScriptsController_unix.cpp)
endif()
target_compile_features(${PROJECT_NAME}
PRIVATE cxx_std_17)
target_include_directories(${PROJECT_NAME} PRIVATE
${SDL2_DIR}/include
${QJoy}/src
)
target_compile_definitions(${PROJECT_NAME} PRIVATE
SDL_SUPPORTED
)
target_link_libraries(${PROJECT_NAME}
PRIVATE Qt6::Core
PRIVATE Qt6::Widgets
PRIVATE Qt6::WebSockets
PRIVATE Qt6::PrintSupport
PRIVATE Qt6::WebEngineQuick
PRIVATE Qt6::Qml
PRIVATE Qt6::Quick
PRIVATE Qt6::QuickControls2
PRIVATE Qt6::Gui
PRIVATE Qt6::Concurrent
PRIVATE ${OpenCV_LIBS}
${SDL2_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT})