-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
89 lines (76 loc) · 2.21 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
# This file is part of qawno.
#
# qawno is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qawno is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qawno. If not, see <http:#www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0043 OLD)
project(qawno VERSION 0.1.0)
set(CMAKE_AUTOMOC ON)
find_package(Qt5Core)
find_package(Qt5Widgets)
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_BINARY_DIR})
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
configure_file(qawno.h.in qawno.h @ONLY)
set(HEADERS
src/AboutDialog.h
src/Compiler.h
src/CompilerOptionsDialog.h
src/EditorWidget.h
src/FindDialog.h
src/GoToDialog.h
src/MainWindow.h
src/OutputWidget.h
src/ReplaceDialog.h
src/StatusBar.h
src/SyntaxHighlighter.h
)
set(SOURCES
src/AboutDialog.cpp
src/Compiler.cpp
src/CompilerOptionsDialog.cpp
src/EditorWidget.cpp
src/FindDialog.cpp
src/GoToDialog.cpp
src/main.cpp
src/MainWindow.cpp
src/OutputWidget.cpp
src/ReplaceDialog.cpp
src/StatusBar.cpp
src/SyntaxHighlighter.cpp
qawno.rc
)
set(UI_SOURCES
src/AboutDialog.ui
src/CompilerOptionsDialog.ui
src/FindDialog.ui
src/GoToDialog.ui
src/MainWindow.ui
src/ReplaceDialog.ui
)
qt5_wrap_ui(UI_HEADERS ${UI_SOURCES})
qt5_add_resources(RESOURCES qawno.qrc)
add_executable(qawno ${HEADERS} ${SOURCES} ${UI_HEADERS} ${RESOURCES})
qt5_use_modules(qawno Core Widgets)
if(WIN32)
if(MSVC)
set_property(TARGET qawno APPEND_STRING PROPERTY
LINK_FLAGS " /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")
elseif(MINGW)
set_property(TARGET qawno APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-subsystem,windows")
endif()
endif()