forked from FairRootGroup/FairRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
571 lines (499 loc) · 20 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
################################################################################
# Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# #
# This software is distributed under the terms of the #
# GNU Lesser General Public Licence (LGPL) version 3, #
# copied verbatim in the file "LICENSE" #
################################################################################
# The name of our project is "FairRoot". CMakeLists files in this project can
# refer to the root source directory of the project as ${FAIRROOT_SOURCE_DIR} or
# as ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as
# ${FAIRROOT_BINARY_DIR} or ${CMAKE_BINARY_DIR}.
# This difference is important for the base classes which are in FAIRROOT
# and the subproject (i.e: CbmRoot, Pandaroot,... etc).
# Check if cmake has the required version
CMAKE_MINIMUM_REQUIRED(VERSION 3.11.0 FATAL_ERROR)
cmake_policy(VERSION 3.11...3.19)
set(CMAKE_INSTALL_MESSAGE LAZY)
# Set project version
SET(FAIRROOT_MAJOR_VERSION 18)
SET(FAIRROOT_MINOR_VERSION 6)
SET(FAIRROOT_PATCH_VERSION 9)
if(APPLE)
if(NOT DEFINED CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER clang)
endif()
if(NOT DEFINED CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER clang++)
endif()
endif()
# Set name of our project to "FAIRROOT".
# Has to be done after check of cmake version
# This also sets ${FAIRROOT_VERSION} to the provided VERSION value, which would be empty if not set here explicitly
project(FAIRROOT VERSION ${FAIRROOT_MAJOR_VERSION}.${FAIRROOT_MINOR_VERSION}.${FAIRROOT_PATCH_VERSION})
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/
# is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
# Generate compile_commands.json file (https://clang.llvm.org/docs/JSONCompilationDatabase.html)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Define CMAKE_INSTALL_*DIR family of variables
include(GNUInstallDirs)
include(FairRootTargetRootDictionary)
# Define install dirs
set(PROJECT_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR})
set(PROJECT_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
set(PROJECT_INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR}/fairbase) # TODO: change 'fairbase' to ${PROJECT_NAME_LOWER}
# https://cmake.org/Wiki/CMake_RPATH_handling
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_LIBDIR}" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${PROJECT_INSTALL_LIBDIR}")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(CMAKE_INSTALL_RPATH "@loader_path/../${PROJECT_INSTALL_LIBDIR}")
else()
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_LIBDIR}")
endif()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-Wl,--enable-new-dtags")
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-Wl,--enable-new-dtags")
endif()
if(CMAKE_GENERATOR STREQUAL "Ninja" AND
((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)))
# Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support.
# Rationale in https://github.com/ninja-build/ninja/issues/814
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
endif()
# Set a default if not specified by the user
if(NOT DEFINED BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS ON)
endif()
SET(VMCWORKDIR ${CMAKE_SOURCE_DIR}/examples)
include(CheckSymbolExists)
# Load some basic macros which are needed later on
include(FairMacros)
include(WriteConfigFile)
include(Dart)
include(CheckCompiler)
#Check the compiler and set the compile and link flags
Check_Compiler()
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
Option(USE_PATH_INFO "Information from PATH and LD_LIBRARY_PATH are used." OFF)
If(USE_PATH_INFO)
Set(PATH $ENV{PATH})
If (APPLE)
Set(LD_LIBRARY_PATH $ENV{DYLD_LIBRARY_PATH})
Else (APPLE)
Set(LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
EndIf (APPLE)
EndIf(USE_PATH_INFO)
# Check if the user wants to build the project in the source
# directory and if the install directory is different from the build
# directory
CHECK_OUT_OF_SOURCE_BUILD()
CHECK_INSTALL_DIRECTORY()
# Check if we are on an UNIX system. If not stop with an error
# message
IF(NOT UNIX)
MESSAGE(FATAL_ERROR "You're not on an UNIX system. The project was up to now only tested on UNIX systems, so we break here. If you want to go on please edit the CMakeLists.txt in the source directory.")
ENDIF(NOT UNIX)
#Check if necessary environment variables are set
#If not stop execution unless modular build is activated
#Option(FAIRROOT_MODULAR_BUILD "Modular build without environment variables" OFF)
#IF(NOT FAIRROOT_MODULAR_BUILD)
If(FAIRSOFT_CONFIG)
IF(NOT DEFINED ENV{SIMPATH})
MESSAGE(FATAL_ERROR "You did not define the environment variable SIMPATH which is nedded to find the external packages. Please set this variable and execute cmake again.")
ENDIF(NOT DEFINED ENV{SIMPATH})
STRING(REGEX MATCHALL "[^:]+" PATH $ENV{PATH})
SET(SIMPATH $ENV{SIMPATH})
endif()
# Check if the external packages are installed into a separate install
# directory
CHECK_EXTERNAL_PACKAGE_INSTALL_DIR()
# Set option(s)
option(BUILD_UNITTESTS "Build all unittests and add them as new tests" OFF)
# searches for needed packages
# REQUIRED means that cmake will stop if this packages are not found
# For example the framework can run without GEANT4, but ROOT is
# mandatory
if(SIMPATH)
set(CMAKE_PREFIX_PATH ${SIMPATH} ${CMAKE_PREFIX_PATH})
set(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} ${SIMPATH}/lib)
endif()
# FairRoot only supports ROOT6, so check which version is available
find_package2(PUBLIC ROOT VERSION 6.10.00 REQUIRED)
if(ROOT_vmc_FOUND)
set(VMCLIB ROOT::VMC)
else()
find_package2(PUBLIC VMC REQUIRED)
set(VMCLIB VMCLibrary)
endif()
find_package2(PUBLIC FairLogger VERSION 1.2.0 REQUIRED)
foreach(dep IN LISTS FairLogger_PACKAGE_DEPENDENCIES)
if(NOT dep STREQUAL "Boost")
find_package2(PUBLIC ${dep} REQUIRED VERSION ${FairLogger_${dep}_VERSION})
set(PROJECT_${dep}_VERSION ${FairLogger_${dep}_VERSION})
if(dep STREQUAL "fmt") # handling of external fmt installation
get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES)
set(FairLogger_INCDIR ${FairLogger_INCDIR} ${FMT_INCLUDE_DIR})
endif()
endif()
endforeach()
find_package2(PUBLIC Pythia6)
find_package2(PUBLIC Pythia8)
find_package2(PUBLIC Protobuf)
find_package2(PUBLIC msgpack)
find_package2(PUBLIC Flatbuffers)
find_package2(PUBLIC Geant3)
find_package2(PUBLIC Geant4)
Find_Package2(PUBLIC VGM)
find_package2(PUBLIC Geant4VMC)
find_package2(PUBLIC IWYU)
find_package2(PUBLIC GSL)
if(NOT DEFINED GTEST_ROOT)
set(GTEST_ROOT ${SIMPATH})
endif()
find_package2(PUBLIC FairMQ VERSION 1.4.0)
find_package2(PUBLIC DDS)
If(FAIRSOFT_EXTERN)
set(BOOST_ROOT ${SIMPATH})
set(GSL_DIR ${SIMPATH})
Else(FAIRSOFT_EXTERN)
set(BOOST_ROOT ${SIMPATH}/basics/boost)
set(GSL_DIR ${SIMPATH}/basics/gsl)
EndIf(FAIRSOFT_EXTERN)
if(NOT DEFINED Boost_NO_SYSTEM_PATHS)
Set(Boost_NO_SYSTEM_PATHS TRUE)
endif()
if(NOT DEFINED Boost_NO_BOOST_CMAKE AND CMAKE_VERSION VERSION_LESS 3.15)
Set(Boost_NO_BOOST_CMAKE TRUE)
endif()
if(Boost_NO_BOOST_CMAKE)
# If an older version of boost is found both of the variables below are
# cached and in a second cmake run, a good boost version is found even
# if the version is to old.
# To overcome this problem both variables are cleared before checking
# for boost.
Unset(Boost_INCLUDE_DIR CACHE)
Unset(Boost_LIBRARY_DIRS CACHE)
endif()
list(APPEND boost_dependencies filesystem serialization)
if(BUILD_UNITTESTS)
list(APPEND boost_dependencies unit_test_framework)
endif()
find_package2(PUBLIC Boost
VERSION 1.67
COMPONENTS ${boost_dependencies}
ADD_REQUIREMENTS_OF FairMQ
)
If (Boost_FOUND)
Set(Boost_Avail 1)
Else (Boost_FOUND)
Set(Boost_Avail 0)
EndIf (Boost_FOUND)
set(FAIRROOT_LIBRARY_PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}
VERSION "${FAIRROOT_VERSION}"
SOVERSION "${FAIRROOT_MAJOR_VERSION}.${FAIRROOT_MINOR_VERSION}"
)
set(PROJECT_LIBRARY_PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES})
find_package2(PUBLIC yaml-cpp)
# Workaround missing exported include directories
# Upstream has fixed this in https://github.com/jbeder/yaml-cpp/commit/ab5f9259a4e67d3fe0e4832bd407a9e596e2d884 (since 0.6.3)
if(yaml-cpp_FOUND)
get_filename_component(YAML_CPP_INCLUDE_DIR "${YAML_CPP_INCLUDE_DIR}" REALPATH BASE_DIR "/")
endif()
if( yaml-cpp_FOUND
AND TARGET yaml-cpp
AND EXISTS YAML_CPP_INCLUDE_DIR
AND yaml-cpp_VERSION VERSION_LESS 0.6.3
)
set_target_properties(yaml-cpp PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${YAML_CPP_INCLUDE_DIR}"
)
endif()
configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/FairRootConfigVersion.cmake.in "${CMAKE_BINARY_DIR}/FairRootConfigVersion.cmake" @ONLY)
# Load the macro to generate the needed version info at compile time
Generate_Version_Info()
# Set some useful variables
SetBasicVariables()
# Recurse into the given subdirectories. This does not actually
# cause another cmake executable to run. The same process will walk through
# the project's entire directory structure.
add_subdirectory(fairtools)
add_subdirectory(alignment)
option(BUILD_MBS "Build MBS" ON)
add_subdirectory(base)
add_subdirectory(geobase)
add_subdirectory(parbase)
add_subdirectory(generators)
If(Geant3_FOUND)
add_subdirectory(geane)
add_subdirectory(trackbase)
EndIf ()
execute_process(COMMAND ${ROOT_CONFIG_EXECUTABLE} --has-opengl OUTPUT_VARIABLE
ROOT_HAS_OPENGL_VAR)
if(${ROOT_HAS_OPENGL_VAR} MATCHES "yes")
add_subdirectory(eventdisplay)
Set(ROOT_HAS_OPENGL TRUE)
else()
message(STATUS "eventdisplay will not be built, because ROOT has no opengl support.")
Set(ROOT_HAS_OPENGL FALSE)
endif()
if(BUILD_MBS)
add_subdirectory(MbsAPI)
endif()
add_subdirectory(datamatch)
add_subdirectory(templates)
If (FairMQ_FOUND AND Boost_FOUND)
add_subdirectory(base/MQ)
add_subdirectory(parmq)
Else ()
Message(STATUS "base/MQ and parmq will not be built, because FairMQ and/or Boost was not found.")
EndIf ()
Option(BUILD_DOXYGEN "Build Doxygen" OFF)
if(BUILD_DOXYGEN)
MESSAGE(STATUS "*** Building the Doxygen documentation ***")
add_subdirectory(doxygen)
endif(BUILD_DOXYGEN)
Option(BUILD_EXAMPLES "Build Examples" ON)
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif(BUILD_EXAMPLES)
if(IWYU_FOUND)
add_custom_target(checkHEADERS DEPENDS $ENV{ALL_HEADER_RULES})
endif(IWYU_FOUND)
find_package2(PRIVATE ClangFormat)
if(ClangFormat_FOUND)
add_custom_target(FormatCheck
${CMAKE_COMMAND} -E env FAIRROOT_GIT_CLANG_FORMAT_BIN=${GIT_CLANG_FORMAT_BIN} ${CMAKE_SOURCE_DIR}/check-format.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
endif()
if(${CMAKE_BUILD_TYPE} MATCHES PROFILE)
set(BUILD_UNITTESTS ON)
endif()
if(BUILD_UNITTESTS)
find_package2(PRIVATE GTest REQUIRED VERSION 1.7.0)
message(STATUS "Building the unit tests.")
add_subdirectory(test)
endif()
add_subdirectory(test/tgeo)
if(BUILD_EXAMPLES)
install(DIRECTORY
examples/common/gconfig
examples/common/geometry
DESTINATION ${PROJECT_INSTALL_DATADIR}/examples/common
)
endif(BUILD_EXAMPLES)
install(FILES ${CMAKE_BINARY_DIR}/config.sh_install
DESTINATION bin
RENAME FairRootConfig.sh
)
install(FILES ${CMAKE_BINARY_DIR}/check_system.sh
DESTINATION bin
)
install(FILES ${CMAKE_BINARY_DIR}/FairVersion.h
DESTINATION include
)
install(FILES ${CMAKE_BINARY_DIR}/config.csh_install
DESTINATION bin
RENAME FairRootConfig.csh
)
install(FILES ${CMAKE_BINARY_DIR}/check_system.csh
DESTINATION bin
)
install(DIRECTORY cmake
DESTINATION ${PROJECT_INSTALL_DATADIR}
)
find_package(Git)
set (Git_VERSION ${GIT_VERSION_STRING})
string(REPLACE "git" " " Git_ROOT ${GIT_EXECUTABLE} )
If(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
Execute_Process(COMMAND ${GIT_EXECUTABLE} describe --tags
OUTPUT_VARIABLE FAIRROOT_GIT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
Else()
Set(FAIRROOT_GIT_VERSION v${FAIRROOT_MAJOR_VERSION}.${FAIRROOT_MINOR_VERSION}.${FAIRROOT_PATCH_VERSION})
EndIf()
Configure_File(${CMAKE_SOURCE_DIR}/cmake/scripts/fairroot-config.in ${CMAKE_BINARY_DIR}/fairroot-config @ONLY)
install(PROGRAMS ${CMAKE_BINARY_DIR}/fairroot-config
DESTINATION bin
)
WRITE_CONFIG_FILE(config.sh)
WRITE_CONFIG_FILE(config.csh)
SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/fairbase/examples)
SET(ROOT_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/include)
WRITE_CONFIG_FILE(config.sh_install)
WRITE_CONFIG_FILE(config.csh_install)
# Summary ######################################################################
if(CMAKE_CXX_FLAGS)
message(STATUS " ")
message(STATUS " ${Cyan}GLOBAL CXX FLAGS${CR} ${BGreen}${CMAKE_CXX_FLAGS}${CR}")
endif()
if(CMAKE_CXX_STANDARD)
message(STATUS " ")
message(STATUS " ${Cyan}GLOBAL CXX STANDARD${CR} ${BGreen}c++${CMAKE_CXX_STANDARD}${CR}")
endif()
if(CMAKE_CONFIGURATION_TYPES)
message(STATUS " ")
message(STATUS " ${Cyan}BUILD TYPE CXX FLAGS${CR}")
string(TOUPPER "${CMAKE_BUILD_TYPE}" selected_type)
foreach(type IN LISTS CMAKE_CONFIGURATION_TYPES)
string(TOUPPER "${type}" type_upper)
if(type_upper STREQUAL selected_type)
pad("${type}" 18 " " type_padded)
message(STATUS "${BGreen}* ${type_padded}${CMAKE_CXX_FLAGS_${type_upper}}${CR}")
else()
pad("${type}" 18 " " type_padded)
message(STATUS " ${BWhite}${type_padded}${CR}${CMAKE_CXX_FLAGS_${type_upper}}")
endif()
unset(type_padded)
unset(type_upper)
endforeach()
message(STATUS " ")
message(STATUS " (Change the build type with ${BMagenta}-DCMAKE_BUILD_TYPE=...${CR})")
endif()
################################################################################
if(PROJECT_PACKAGE_DEPENDENCIES)
message(STATUS " ")
message(STATUS " ${Cyan}DEPENDENCY FOUND VERSION PREFIX${CR}")
foreach(dep IN LISTS PROJECT_PACKAGE_DEPENDENCIES)
if(${dep}_VERSION)
if(${dep} STREQUAL DDS)
if(DDS_VERSION)
set(version_str "${BGreen}${${dep}_VERSION}${CR}")
else()
set(version_str "${BGreen}${${dep}_MAJOR_VERSION}.${${dep}_MINOR_VERSION}${CR}")
endif()
elseif(${dep} STREQUAL Boost)
if(Boost_VERSION_MAJOR)
set(version_str "${BGreen}${${dep}_VERSION_MAJOR}.${${dep}_VERSION_MINOR}${CR}")
else()
set(version_str "${BGreen}${${dep}_MAJOR_VERSION}.${${dep}_MINOR_VERSION}${CR}")
endif()
else()
set(version_str "${BGreen}${${dep}_VERSION}${CR}")
endif()
else()
set(version_str "${BYellow}unknown${CR}")
endif()
if(PROJECT_${dep}_VERSION)
set(version_req_str " (>= ${PROJECT_${dep}_VERSION})")
endif()
pad(${dep} 20 " " dep_padded)
if(DISABLE_COLOR)
pad("${version_str}${version_req_str}" 25 " " version_padded)
else()
pad("${version_str}${version_req_str}" 25 " " version_padded COLOR 1)
endif()
set(prefix ${${dep}_PREFIX})
if(${dep} STREQUAL Boost)
if(TARGET Boost::headers)
get_target_property(boost_include Boost::headers INTERFACE_INCLUDE_DIRECTORIES)
else()
get_target_property(boost_include Boost::boost INTERFACE_INCLUDE_DIRECTORIES)
endif()
get_filename_component(prefix ${boost_include}/.. ABSOLUTE)
elseif(${dep} STREQUAL Protobuf)
get_filename_component(prefix ${Protobuf_INCLUDE_DIRS}/.. ABSOLUTE)
elseif(${dep} STREQUAL msgpack)
get_target_property(msgpack_include msgpackc INTERFACE_INCLUDE_DIRECTORIES)
get_filename_component(prefix ${msgpack_include}/.. ABSOLUTE)
elseif(${dep} STREQUAL Pythia6)
get_filename_component(prefix ${PYTHIA6_LIBRARY_DIR}/.. ABSOLUTE)
elseif(${dep} STREQUAL Pythia8)
get_filename_component(prefix ${PYTHIA8_LIB_DIR}/.. ABSOLUTE)
elseif(${dep} STREQUAL FairLogger)
if(FairLogger_PREFIX)
set(prefix ${FairLogger_PREFIX})
else()
set(prefix ${FairLogger_ROOT})
endif()
elseif(${dep} STREQUAL FairMQ)
if(FairMQ_PREFIX)
set(prefix ${FairMQ_PREFIX})
else()
set(prefix ${FairMQ_ROOT})
endif()
elseif(${dep} STREQUAL yaml-cpp)
get_filename_component(prefix ${YAML_CPP_INCLUDE_DIR}/.. ABSOLUTE)
elseif(${dep} STREQUAL Geant4VMC)
string(REPLACE ":" ";" geant4vmc_include ${Geant4VMC_INCLUDE_DIRS})
list(GET geant4vmc_include 0 geant4vmc_include)
get_filename_component(prefix ${geant4vmc_include}/../.. ABSOLUTE)
elseif(${dep} STREQUAL Geant3)
get_target_property(geant3_include geant321 INTERFACE_INCLUDE_DIRECTORIES)
string(REPLACE ":" ";" geant3_include ${geant3_include})
list(GET geant3_include 0 geant3_include)
get_filename_component(prefix ${geant3_include}/../.. ABSOLUTE)
elseif(${dep} STREQUAL Geant4)
list(GET Geant4_INCLUDE_DIRS 0 geant4_include)
get_filename_component(prefix ${geant4_include}/../.. ABSOLUTE)
elseif(${dep} STREQUAL VGM)
string(REPLACE ":" ";" vgm_include ${VGM_INCLUDE_DIRS})
list(GET vgm_include 0 vgm_include)
get_filename_component(prefix ${vgm_include}/.. ABSOLUTE)
elseif(${dep} STREQUAL ROOT)
set(prefix ${ROOT_INSTALL_DIR})
elseif(${dep} STREQUAL IWYU)
get_filename_component(prefix ${IWYU_BINARY}/.. ABSOLUTE)
elseif(${dep} STREQUAL yaml-cpp)
get_filename_component(prefix ${YAML_CPP_INCLUDE_DIR}/.. ABSOLUTE)
elseif(${dep} STREQUAL fmt)
get_target_property(fmt_include fmt::fmt INTERFACE_INCLUDE_DIRECTORIES)
get_filename_component(prefix ${fmt_include}/.. ABSOLUTE)
elseif(${dep} STREQUAL VMC)
get_target_property(vmc_include VMCLibrary INTERFACE_INCLUDE_DIRECTORIES)
get_filename_component(prefix ${vmc_include}/.. ABSOLUTE)
elseif(${dep} STREQUAL Flatbuffers)
if(TARGET flatbuffers::flatbuffers)
get_target_property(flatbuffers_include flatbuffers::flatbuffers INTERFACE_INCLUDE_DIRECTORIES)
else()
get_target_property(flatbuffers_include flatbuffers::flatbuffers_shared INTERFACE_INCLUDE_DIRECTORIES)
endif()
get_filename_component(prefix ${flatbuffers_include}/.. ABSOLUTE)
elseif(${dep} STREQUAL DDS)
set(prefix ${DDS_INSTALL_PREFIX})
endif()
message(STATUS " ${BWhite}${dep_padded}${CR}${version_padded}${prefix}")
if(${dep} STREQUAL Geant3)
message(STATUS " G3SYS: ${Geant3_SYSTEM_DIR}")
endif()
if(${dep} STREQUAL Geant4)
foreach(dataset IN LISTS Geant4_DATASETS)
pad(${Geant4_DATASET_${dataset}_ENVVAR} 20 " " envvar_padded LEFT)
message(STATUS " ${envvar_padded}: ${Geant4_DATASET_${dataset}_PATH}")
endforeach()
endif()
unset(version_str)
unset(version_padded)
unset(version_req_str)
endforeach()
endif()
message(STATUS " ")
message(STATUS " ${Cyan}COMPONENT BUILT? INFO${CR}")
if(BUILD_EXAMPLES)
set(examples_summary "${BGreen}YES${CR} (default, disable with ${BMagenta}-DBUILD_EXAMPLES=OFF${CR})")
else()
set(examples_summary "${BRed} NO${CR} (enable with ${BMagenta}-DBBUILD_EXAMPLES=ON${CR})")
endif()
message(STATUS " ${BWhite}Examples${CR} ${examples_summary}")
if(BUILD_DOXYGEN)
set(doxygen_summary "${BGreen}YES${CR} (default, disable with ${BMagenta}-DBUILD_DOXYGENS=OFF${CR})")
else()
set(doxygen_summary "${BRed} NO${CR} (enable with ${BMagenta}-DBUILD_DOXYGEN=ON${CR})")
endif()
message(STATUS " ${BWhite}Doxygen${CR} ${doxygen_summary}")
if(BUILD_UNITTESTS)
set(unittests_summary "${BGreen} YES${CR} (disable with ${BMagenta}-DBUILD_UNITTESTS=OFF${CR})")
else()
set(unittests_summary "${BRed} NO${CR} (default, enable with ${BMagenta}-DBUILD_UNITTESTS=ON${CR})")
endif()
message(STATUS " ${BWhite}Unit tests${CR} ${unittests_summary}")
message(STATUS " ")
################################################################################