forked from KDAB/hotspot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
107 lines (88 loc) · 2.89 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
101
102
103
104
105
106
107
cmake_minimum_required(VERSION 3.1.0)
project(hotspot VERSION 1.3.80 LANGUAGES CXX C)
if (POLICY CMP0063)
cmake_policy (SET CMP0063 NEW)
endif (POLICY CMP0063)
set(CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/perfparser/cmake/
${CMAKE_CURRENT_SOURCE_DIR}/cmake/
${CMAKE_MODULE_PATH}
)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if(NOT DEFINED CMAKE_INSTALL_RPATH_USE_LINK_PATH)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Enable the test harness
enable_testing()
# Version setup
set(HOTSPOT_VERSION_STRING "${hotspot_VERSION}")
include(HotspotMacrosInternal)
include(FeatureSummary)
find_package(Qt5 5.15 COMPONENTS Core Widgets Network Test Svg REQUIRED)
find_package(LibElf REQUIRED)
find_package(Elfutils REQUIRED)
find_package(ECM 1.0.0 NO_MODULE REQUIRED)
find_package(Threads REQUIRED)
find_package(Zstd)
find_package(objdump)
set_package_properties(objdump PROPERTIES
DESCRIPTION "Utility to generate disassembler"
PURPOSE "Support for annotating individual instructions"
URL "https://www.gnu.org/software/binutils/"
TYPE RUNTIME)
find_package(LibRustcDemangle)
set_package_properties(LibRustcDemangle PROPERTIES
DESCRIPTION "Demangling for Rust symbols, written in Rust."
PURPOSE "Demangling of Rust symbols"
URL "https://github.com/alexcrichton/rustc-demangle"
TYPE RUNTIME)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(KF5 COMPONENTS
ThreadWeaver
I18n
ConfigWidgets
CoreAddons
ItemViews
ItemModels
KIO
Solid
WindowSystem
Notifications
IconThemes
REQUIRED
)
find_package(KDDockWidgets CONFIG)
set_package_properties(KDDockWidgets PROPERTIES
PURPOSE "KDDockWidgets is a Qt dock widget library written by KDAB, suitable for replacing QDockWidget and implementing
advanced functionalities missing in Qt. https://github.com/KDAB/KDDockWidgets"
TYPE REQUIRED
)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(ECMAddTests)
include(ECMCoverageOption)
include(ECMEnableSanitizers)
file(RELATIVE_PATH LIBEXEC_REL_PATH
"${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_BINDIR}"
"${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_LIBEXECDIR}")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/hotspot-config.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/hotspot-config.h
@ONLY
)
add_subdirectory(3rdparty)
add_subdirectory(scripts)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(src)
add_subdirectory(tests)
install(FILES hotspot.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES com.kdab.Hotspot.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})