-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
27 lines (19 loc) · 1.28 KB
/
CMakeLists.txt
File metadata and controls
27 lines (19 loc) · 1.28 KB
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
cmake_minimum_required(VERSION 3.10)
project(rootHistogramViewer)
set(CMAKE_CXX_STANDARD 11)
find_package(ROOT REQUIRED COMPONENTS Gui)
include(${ROOT_USE_FILE})
ROOT_GENERATE_DICTIONARY(MainFrameDictionary include/MainFrame.hpp LINKDEF include/MainFrameLinkDef.h)
add_library(RootHistogramViewer SHARED MainFrameDictionary.cxx source/MainFrame.cpp)
target_include_directories(RootHistogramViewer SYSTEM BEFORE PUBLIC include PUBLIC ${ROOT_INCLUDE_DIRS})
target_link_libraries(RootHistogramViewer ${ROOT_LIBRARIES} Gui)
set_target_properties(RootHistogramViewer PROPERTIES PUBLIC_HEADER include/MainFrame.hpp)
add_executable(rootHistogramViewer source/main.cpp)
target_include_directories(rootHistogramViewer SYSTEM BEFORE PUBLIC include PUBLIC ${ROOT_INCLUDE_DIRS})
target_link_libraries(rootHistogramViewer RootHistogramViewer)
install(TARGETS rootHistogramViewer RootHistogramViewer RUNTIME DESTINATION bin LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include/RootHistogramViewer/)
file(GLOB dictionaryFiles ${CMAKE_BINARY_DIR}/lib*Dictionary*)
install(FILES ${dictionaryFiles} DESTINATION lib)
configure_file(share/modulefile/rootHistogramViewer modulefile/rootHistogramViewer @ONLY)
install(DIRECTORY ${CMAKE_BINARY_DIR}/modulefile share/scripts DESTINATION share/RootHistogramViewer)