-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
75 lines (62 loc) · 1.52 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
project(kit)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
#set(QT_MIN_VERSION "5.3.0")
#set(KF5_MIN_VERSION "5.2.0")
find_package(ECM 1.0.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(FeatureSummary)
# Find Qt modules
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
Widgets
)
# Find KDE modules
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
CoreAddons
I18n
WidgetsAddons
XmlGui
KIO
Parts
Notifications
Config
)
# run moc automatically
set(CMAKE_AUTOMOC ON)
# enable C++11
add_definitions("-std=c++11")
# find qt headers in same build dir
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# show all warnings
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic")
cmake_policy(SET CMP0063 NEW)
endif()
add_executable(main_EXE
src/main.cpp
src/gitinterface.cpp
src/mainwindow.cpp
src/terminal.cpp
src/widgets/branchwidget.cpp
src/widgets/statuswidget.cpp
src/widgets/stashwidget.cpp
)
# find qt libraries for linking
target_link_libraries(main_EXE
#Qt5::Core
Qt5::Widgets
KF5::CoreAddons
KF5::I18n
KF5::WidgetsAddons
KF5::XmlGui
KF5::KIOCore
KF5::KIOWidgets
KF5::KIOFileWidgets
KF5::Parts
KF5::Notifications
KF5::ConfigCore
)
install(TARGETS main_EXE ${INSTALL_TARGETS_DEFAULT_ARGS})