-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (52 loc) · 1.87 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
cmake_minimum_required(VERSION 3.14)
project(HVAC-Server LANGUAGES CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core WebSockets Network)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core WebSockets Network)
add_executable(HVAC-Server
src/main.cpp
src/serverapplication.h src/serverapplication.cpp
src/connectionhandler.h src/connectionhandler.cpp
src/options.h src/options.cpp
src/serverinformation.h
src/packetbuilder.h src/packetbuilder.cpp
src/clientmanager.h src/clientmanager.cpp
src/client.h src/client.cpp
src/packetrelay.h src/packetrelay.cpp
src/coordinatorclient.h src/coordinatorclient.cpp
src/packet/packet.h
src/packet/packetfactory.h src/packet/packetfactory.cpp
src/areas/areamanager.h src/areas/areamanager.cpp
src/packet/packet_hello.h src/packet/packet_hello.cpp
src/packet/packet_generic.h src/packet/packet_generic.cpp
src/packet/packet_selectcharacter.h src/packet/packet_selectcharacter.cpp
src/constants.h
src/datatypes.h
src/areas/location.h src/areas/location.cpp
src/areas/area.h src/areas/area.cpp
src/helper.h
src/banmanager.h src/banmanager.cpp
src/packet/packet_selectarea.h src/packet/packet_selectarea.cpp
)
target_include_directories(HVAC-Server
PRIVATE src
PRIVATE src/packet
PRIVATE src/areas
)
target_link_libraries(HVAC-Server
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::WebSockets
Qt${QT_VERSION_MAJOR}::Network
)
include(GNUInstallDirs)
install(TARGETS HVAC-Server
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
set_target_properties(HVAC-Server PROPERTIES
LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_LIST_DIR}/bin>
RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_LIST_DIR}/bin>)