-
Notifications
You must be signed in to change notification settings - Fork 22
/
CMakeLists.txt
63 lines (56 loc) · 2.49 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.8)
PROJECT(QTrojanAssessment C CXX)
################################################################################
# Compiler and linker options
ADD_DEFINITIONS(-Wall -DWIN32_LEAN_AND_MEAN -DUNICODE)
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTORCC ON)
SET(CMAKE_CXX_STANDARD 11)
################################################################################
# Sources and libraries
FILE(GLOB CHARTDIRECTOR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/ChartDirector/*")
FILE(GLOB MANOMETER "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/Manometer/*")
FILE(GLOB BUSINESSLAYER "${CMAKE_CURRENT_SOURCE_DIR}/base/BusinessLayer/*")
FILE(GLOB CUSTOMCONTROL "${CMAKE_CURRENT_SOURCE_DIR}/base/CustomControl/*")
FILE(GLOB ABOUTDIALOG "${CMAKE_CURRENT_SOURCE_DIR}/forms/AboutDialog/*")
FILE(GLOB ASSESSMENTTAB "${CMAKE_CURRENT_SOURCE_DIR}/forms/AssessmentTab/*")
FILE(GLOB CACHETAB "${CMAKE_CURRENT_SOURCE_DIR}/forms/CacheTab/*")
FILE(GLOB FILEMONITORTAB "${CMAKE_CURRENT_SOURCE_DIR}/forms/FileMonitorTab/*")
FILE(GLOB IETAB "${CMAKE_CURRENT_SOURCE_DIR}/forms/IETab/*")
FILE(GLOB MAINFORM "${CMAKE_CURRENT_SOURCE_DIR}/forms/MainForm/*")
FILE(GLOB MEMORYTAB "${CMAKE_CURRENT_SOURCE_DIR}/forms/MemoryTab/*")
FILE(GLOB NETWORKTAB "${CMAKE_CURRENT_SOURCE_DIR}/forms/NetworkTab/*")
FILE(GLOB PROCESSTAB "${CMAKE_CURRENT_SOURCE_DIR}/forms/ProcessTab/*")
FILE(GLOB REGISTRYTAB "${CMAKE_CURRENT_SOURCE_DIR}/forms/RegistryTab/*")
FILE(GLOB TITLEWIDGET "${CMAKE_CURRENT_SOURCE_DIR}/forms/TitleWidget/*")
SET(RESOURCES
${CMAKE_CURRENT_SOURCE_DIR}/resource/images/app.rc
${CMAKE_CURRENT_SOURCE_DIR}/resource/trojanassessment.qrc)
FIND_PACKAGE(Qt5 COMPONENTS Core Widgets Xml Gui REQUIRED)
qt5_wrap_ui(UI_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/resource/cacheentrydetail.ui)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/ChartDirector/lib/)
################################################################################
# Compile target
ADD_EXECUTABLE ( ${PROJECT_NAME}
${CHARTDIRECTOR}
${MANOMETER}
${BUSINESSLAYER}
${CUSTOMCONTROL}
${RESOURCES}
${UI_HEADERS}
${ABOUTDIALOG}
${ASSESSMENTTAB}
${CACHETAB}
${FILEMONITORTAB}
${IETAB}
${MAINFORM}
${MEMORYTAB}
${NETWORKTAB}
${PROCESSTAB}
${REGISTRYTAB}
${TITLEWIDGET}
${CMAKE_CURRENT_SOURCE_DIR}/base/main.cpp)
# https://www.kdab.com/using-cmake-with-qt-5/
qt5_use_modules(${PROJECT_NAME} Core Widgets Gui Xml)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} chartdir51.lib)