-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
55 lines (38 loc) · 1.43 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
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
project(Stream)
#---Set paths where to put the libraries, executables and headers------------------------------
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
#--- where to search for cmake modules ----
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
#--- Load some basic macros ---
include(StreamMacros)
# looking for ROOT and Go4
find_package(Go4 QUIET)
if(NOT Go4_FOUND)
find_package(ROOT QUIET)
endif()
# ====== check ROOT and its c++ standard ==========
if(ROOT_FOUND AND ROOT_CXX_STANDARD)
set(CMAKE_CXX_STANDARD ${ROOT_CXX_STANDARD})
message("FOUND ROOT with c++ standard ${CMAKE_CXX_STANDARD}")
endif()
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
if(APPLE)
set(_ldvname_ DYLD_LIBRARY_PATH)
else()
set(_ldvname_ LD_LIBRARY_PATH)
endif()
configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/StreamConfig.cmake.in
${CMAKE_BINARY_DIR}/StreamConfig.cmake COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/streamlogin.in
${CMAKE_BINARY_DIR}/streamlogin @ONLY NEWLINE_STYLE UNIX)
add_subdirectory(framework)
if(Go4_FOUND)
add_subdirectory(go4engine)
endif()
get_property(__allHeaders GLOBAL PROPERTY STREAM_HEADER_TARGETS)
add_custom_target(move_headers ALL DEPENDS ${__allHeaders})