Newer
Older
#==========================================================================
#--------------------------------------------------------------------------
# Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
# All rights reserved.
#
# For the licensing terms see $DD4hepINSTALL/LICENSE.
# For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
#
#==========================================================================
# cd examples ;
# mkdir build ; cd build
# cmake ..
#
# F.Gaede, DESY, 2013
#
# M.Frank, CERN, 2015: Adapt to new cmake scripts
#==========================================================================
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
SET( ENV{DD4hepExamplesINSTALL} ${CMAKE_INSTALL_PREFIX} )
Andre Sailer
committed
IF(NOT TARGET DD4hep::DDCore)
find_package ( DD4hep REQUIRED )
ENDIF()
#==========================================================================
SET(DD4HEP_EXAMPLES "AlignDet CLICSiD ClientTests Conditions DDCMS DDCodex DDDB DDDigi DDG4 DDG4_MySensDet LHeD OpticalSurfaces Persistency SimpleDetector"
CACHE STRING "List of DD4hep Examples to build")
SEPARATE_ARGUMENTS(DD4HEP_EXAMPLES)
MESSAGE(STATUS "Will be building these examples: ${DD4HEP_EXAMPLES}")
FOREACH(DDExample IN LISTS DD4HEP_EXAMPLES)
dd4hep_print("|> Building ${DDExample}")
add_subdirectory(${DDExample})
ENDFOREACH()