Warning, /DD4hep/examples/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 #==========================================================================
0002 # AIDA Detector description implementation
0003 #--------------------------------------------------------------------------
0004 # Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 # All rights reserved.
0006 #
0007 # For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 # For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 #
0010 #==========================================================================
0011 #
0012 # Simple CMakeList.txt file that allows to
0013 # build all dd4hep examples in one go, e.g.
0014 #
0015 # . ./bin/thisdd4hep.sh
0016 # cd examples ;
0017 # mkdir build ; cd build
0018 # cmake ..
0019 #
0020 # F.Gaede, DESY, 2013
0021 #
0022 # M.Frank, CERN, 2015: Adapt to new cmake scripts
0023 #==========================================================================
0024 cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
0025
0026 project( DD4hep_Examples )
0027
0028 include(CTest)
0029 option(BUILD_TESTING "Enable and build tests" ON)
0030 option(DD4HEP_SET_RPATH "Link libraries with built-in RPATH (run-time search path)" ON)
0031
0032 SET( ENV{DD4hepExamplesINSTALL} ${CMAKE_INSTALL_PREFIX} )
0033
0034 IF(NOT TARGET DD4hep::DDCore)
0035 find_package ( DD4hep REQUIRED )
0036 ENDIF()
0037 include(DD4hepMacros)
0038
0039 dd4hep_set_compiler_flags()
0040 dd4hep_configure_output()
0041
0042
0043 #==========================================================================
0044
0045 SET(DD4HEP_EXAMPLES "AlignDet CLICSiD ClientTests Conditions DDCMS DDCodex DDDigi DDG4 DDG4_MySensDet LHeD OpticalSurfaces RICH Persistency DDCAD SimpleDetector"
0046 CACHE STRING "List of DD4hep Examples to build")
0047 SEPARATE_ARGUMENTS(DD4HEP_EXAMPLES)
0048
0049 IF(DD4HEP_BUILD_DEBUG)
0050 SET(DD4HEP_EXAMPLES "${DD4HEP_EXAMPLES} DDDB"
0051 CACHE STRING "List of DD4hep Examples to build")
0052 ENDIF()
0053
0054 FOREACH(DDExample IN LISTS DD4HEP_EXAMPLES)
0055 dd4hep_print("|> Building ${DDExample}")
0056 add_subdirectory(${DDExample})
0057 ENDFOREACH()
0058
0059 ###add_subdirectory(DDUpgrade)
0060
0061 if(APPLE)
0062 SET ( ENV{DD4HEP_LIBRARY_PATH} $ENV{DYLD_LIBRARY_PATH} )
0063 else()
0064 SET ( ENV{DD4HEP_LIBRARY_PATH} ${LD_LIBRARY_PATH} )
0065 SET ( DD4HEP_LIBRARY_PATH ${LD_LIBRARY_PATH} )
0066 endif()
0067
0068 #######################
0069 # Treatment for Apple #
0070 #######################
0071
0072 if(APPLE)
0073 fill_dd4hep_library_path()
0074 message(STATUS "DD4HEP_LIBRARY_PATH= $ENV{DD4HEP_LIBRARY_PATH}")
0075 endif()