-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
84 lines (75 loc) · 2.25 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
project(MoulKI)
cmake_minimum_required(VERSION 2.8.12)
find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(HSPlasmaNet REQUIRED)
find_package(string_theory REQUIRED)
add_definitions(-DST_NO_2_0_DEPRECATION)
include_directories(${STRING_THEORY_INCLUDE_DIRS})
set(MoulKI_SOURCES
main.cpp
MoulKI.cpp
qtAuthClient.cpp
qtGameClient.cpp
qtVault.cpp
LoginDialog.cpp
SetActiveDialog.cpp
RefDialog.cpp
FetchDialog.cpp
qtNodeEdit.cpp
qtSDLTreeModel.cpp
CreateNodeDialog.cpp
pfConsoleParser.cpp
)
set(MoulKI_HEADERS
MoulKI.h
qtAuthClient.h
qtGameClient.h
qtVault.h
qtSDLTreeModel.h
LoginDialog.h
SetActiveDialog.h
RefDialog.h
FetchDialog.h
qtNodeEdit.h
CreateNodeDialog.h
pfConsoleParser.h
)
set(MoulKI_FORMS
MoulKI.ui
LoginDialog.ui
SetActiveDialog.ui
RefDialog.ui
FetchDialog.ui
qtNodeEdit.ui
CreateNodeDialog.ui
)
set(MoulKI_Resources
Resources.qrc
)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "-Wall -std=c++0x ${CMAKE_CXXFLAGS}")
endif()
# Set up Qt requirements
QT5_WRAP_CPP(MoulKI_HEADERS_MOC ${MoulKI_HEADERS})
QT5_WRAP_UI(MoulKI_FORMS_HEADERS ${MoulKI_FORMS})
QT5_ADD_RESOURCES(MoulKI_Resources_RCC ${MoulKI_Resources})
include_directories("${CMAKE_SOURCE_DIR}"
"${OPENSSL_INCLUDE_DIR}"
"${HSPlasmaNet_INCLUDE_DIRS}"
"${CMAKE_CURRENT_BINARY_DIR}" # Required for Qt's autogenerated files
)
source_group("MoulKI Sources" FILES ${MoulKI_SOURCES})
source_group("MoulKI Headers" FILES ${MoulKI_HEADERS})
source_group("MoulKI Forms" FILES ${MoulKI_FORMS})
# These will be in the project listing, so we may as well label them nicely
source_group("Auto-generated" FILES ${MoulKI_HEADERS_MOC} ${MoulKI_FORMS_HEADERS} ${MoulKI_Resources_RCC})
add_executable(MoulKI ${all_SOURCES}
${MoulKI_SOURCES}
${MoulKI_HEADERS}
${MoulKI_HEADERS_MOC}
${MoulKI_FORMS_HEADERS}
${MoulKI_Resources_RCC}
)
target_link_libraries(MoulKI ${HSPlasmaNet_LIBRARIES} Qt5::Core Qt5::Widgets)