-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathCMakeLists.txt
143 lines (130 loc) · 3.84 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
133
134
135
136
137
138
139
140
141
142
143
cmake_minimum_required(VERSION 3.7.0)
project(AttorneyOnline VERSION 2.11.0.0 LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
option(AO_BUILD_TESTS "Build test programs" ON)
option(AO_ENABLE_DISCORD_RPC "Enable Discord Rich Presence" ON)
find_package(QT NAMES Qt6)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets Concurrent WebSockets UiTools)
qt_add_executable(Attorney_Online
src/aoapplication.cpp
src/aoapplication.h
src/aoblipplayer.cpp
src/aoblipplayer.h
src/aobutton.cpp
src/aobutton.h
src/aocharbutton.cpp
src/aocharbutton.h
src/aoclocklabel.cpp
src/aoclocklabel.h
src/aoemotebutton.cpp
src/aoemotebutton.h
src/aoemotepreview.cpp
src/aoemotepreview.h
src/aoevidencebutton.cpp
src/aoevidencebutton.h
src/aoevidencedisplay.cpp
src/aoevidencedisplay.h
src/aoimage.cpp
src/aoimage.h
src/animationlayer.cpp
src/animationlayer.h
src/animationloader.h
src/animationloader.cpp
src/aomusicplayer.cpp
src/aomusicplayer.h
src/aopacket.cpp
src/aopacket.h
src/aosfxplayer.cpp
src/aosfxplayer.h
src/aotextarea.cpp
src/aotextarea.h
src/aotextboxwidgets.cpp
src/aotextboxwidgets.h
src/aoutils.cpp
src/aoutils.h
src/charselect.cpp
src/chatlogpiece.cpp
src/chatlogpiece.h
src/courtroom.cpp
src/courtroom.h
src/datatypes.h
src/debug_functions.cpp
src/debug_functions.h
src/demoserver.cpp
src/demoserver.h
src/discord_rich_presence.cpp
src/discord_rich_presence.h
src/emotes.cpp
src/eventfilters.cpp
src/eventfilters.h
src/evidence.cpp
src/file_functions.cpp
src/file_functions.h
src/gui_utils.h
src/hardware_functions.cpp
src/hardware_functions.h
src/lobby.cpp
src/lobby.h
src/main.cpp
src/network/websocketconnection.cpp
src/network/websocketconnection.h
src/networkmanager.cpp
src/networkmanager.h
src/options.cpp
src/options.h
src/packet_distribution.cpp
src/path_functions.cpp
src/scrolltext.cpp
src/scrolltext.h
src/serverdata.cpp
src/serverdata.h
src/text_file_functions.cpp
src/widgets/aooptionsdialog.cpp
src/widgets/aooptionsdialog.h
src/widgets/direct_connect_dialog.cpp
src/widgets/direct_connect_dialog.h
src/widgets/server_editor_dialog.cpp
src/widgets/server_editor_dialog.h
data.qrc
src/widgets/playerlistwidget.h src/widgets/playerlistwidget.cpp
src/widgets/moderator_dialog.h src/widgets/moderator_dialog.cpp
src/screenslidetimer.h src/screenslidetimer.cpp
src/moderation_functions.h src/moderation_functions.cpp
src/network/serverinfo.h src/network/serverinfo.cpp
)
set_target_properties(Attorney_Online PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
if(WIN32)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set_property(TARGET Attorney_Online PROPERTY WIN32_EXECUTABLE true)
set(APP_ICON_RESOURCE_WINDOWS "${CMAKE_CURRENT_SOURCE_DIR}/data/logo-client.rc")
target_sources(Attorney_Online PRIVATE ${APP_ICON_RESOURCE_WINDOWS})
endif()
endif()
target_include_directories(Attorney_Online PRIVATE src lib)
target_link_directories(Attorney_Online PRIVATE lib)
target_link_libraries(Attorney_Online PRIVATE
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Network
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Concurrent
Qt${QT_VERSION_MAJOR}::WebSockets
Qt${QT_VERSION_MAJOR}::UiTools
bass
bassopus
)
if(AO_ENABLE_DISCORD_RPC)
target_compile_definitions(Attorney_Online PRIVATE AO_ENABLE_DISCORD_RPC)
target_link_libraries(Attorney_Online PRIVATE discord-rpc)
endif()
if(AO_BUILD_TESTS)
add_subdirectory(test)
endif()
set_target_properties(Attorney_Online PROPERTIES
LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_LIST_DIR}/bin>
RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_LIST_DIR}/bin>)