-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (34 loc) · 1.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
cmake_minimum_required(VERSION 3.8)
project(RootViewer)
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(KDEInstallDirs)
include(ECMInstallIcons)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 17)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
# Find the QtWidgets library
find_package(Qt5Widgets REQUIRED)
find_package(ROOT REQUIRED)
include(${ROOT_USE_FILE})
set(rootviewer_SRC
src/main.cpp
src/rootviewer.cpp
src/rootfile.cpp
src/ttreemodel.cpp
src/rootcanvaswidget.cpp
)
# Create code from a list of Qt designer ui files.
#set(CMAKE_AUTOUIC ON) # use this if you have CMake 3.x instead of the following
#qt5_wrap_ui(rootviewer_SRC src/rootviewer.ui)
# Tell CMake to create the helloworld executable
add_executable(rootviewer ${rootviewer_SRC})
# Use the Widgets module from Qt 5.
target_link_libraries(rootviewer Qt5::Widgets ${ROOT_LIBRARIES})
# Install the executable
install(TARGETS rootviewer DESTINATION bin)
install( PROGRAMS ROOTViewer.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
ecm_install_icons(ICONS 128-apps-ROOT.png DESTINATION ${KDE_INSTALL_ICONDIR})