-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
101 lines (80 loc) · 2.5 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
90
91
92
93
94
95
96
97
98
99
100
project(kguitar)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.5.0")
set(CMAKE_VERBOSE_MAKEFILE ON)
find_package(ECM 1.7.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMInstallIcons)
# TODO: determine required modules
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS
Core
Widgets
Xml
PrintSupport
)
find_package(KF5 REQUIRED COMPONENTS
Config
# ConfigWidgets
# DBusAddons
DocTools
# IconThemes
I18n
# IdleTime
# Notifications
# NotifyConfig
# TextWidgets
# XmlGui
# WindowSystem
Parts
)
# ======================================================================
# - Find TSE3
# Find the TSE3 headers and libraries.
#
# TSE3_INCLUDE_DIRS - where to find tse3/*.h, etc.
# TSE3_LIBRARIES - List of libraries when using TSE3.
# TSE3_FOUND - True if TSE3 is found.
# Look for the header file.
find_path(TSE3_INCLUDE_DIR NAMES tse3/TSE3.h)
mark_as_advanced(TSE3_INCLUDE_DIR)
# Look for the library.
find_library(TSE3_LIBRARY NAMES tse3)
mark_as_advanced(TSE3_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set TSE3_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TSE3 DEFAULT_MSG TSE3_LIBRARY TSE3_INCLUDE_DIR)
if(TSE3_FOUND)
set(TSE3_LIBRARIES ${TSE3_LIBRARY})
set(TSE3_INCLUDE_DIRS ${TSE3_INCLUDE_DIR})
endif(TSE3_FOUND)
# ======================================================================
option(WITH_TSE3 "Build KGuitar with TSE3 midi sequencer support" ${TSE3_FOUND})
if(WITH_TSE3 AND NOT TSE3_FOUND)
message(FATAL_ERROR "WITH_TSE3 enabled but not found")
endif(WITH_TSE3 AND NOT TSE3_FOUND)
if(WITH_TSE3)
# for moc can properly generate playbacktracker.h
add_definitions(-DWITH_TSE3=1)
endif(WITH_TSE3)
# TSE3 and other code requires exceptions enabled
kde_enable_exceptions()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
add_definitions(
-D_DEFAULT_SOURCE
-DQT_DEPRECATED_WARNINGS
-DKDE_DEPRECATED_WARNINGS
)
add_subdirectory(kguitar)
add_subdirectory(kguitar_shell)
add_subdirectory(icons)
add_subdirectory(doc)
add_subdirectory(po)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
configure_file(config.h.in kguitar/config.h)
configure_file(config.h.in kguitar_shell/config.h)