Skip to content
Snippets Groups Projects
Commit 2789354e authored by Andre Sailer's avatar Andre Sailer
Browse files

DDG4/CMakeLists

Moved find_package calls to main cmakelists
moved include_directories to main cmakelists
only use dd4hep_generate_rootmap
parent e0facf11
No related branches found
No related tags found
No related merge requests found
#---Find Geant4-------------------------------------------------------------------
#find_package(Geant4 REQUIRED gdml ui_all vis_all)
#if(NOT Geant4_clhep_FOUND)
# find_package(CLHEP REQUIRED)
# set(Geant4_INCLUDE_DIRS ${Geant4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS})
# set(Geant4_LIBRARIES ${Geant4_LIBRARIES} ${CLHEP_LIBRARIES})
#endif()
INCLUDE(${Geant4_USE_FILE}) # this also takes care of geant 4 definitions and include dirs
include(DD4hep_XML_setup)
#---Includedirs-------------------------------------------------------------------
include_directories(${CMAKE_SOURCE_DIR}/DDCore/include
${CMAKE_SOURCE_DIR}/DDSegmentation/include
${CMAKE_CURRENT_SOURCE_DIR}/include
${ROOT_INCLUDE_DIR}
${CLHEP_INCLUDE_DIR}
${Geant4_INCLUDE_DIRS} ) #${LCIO_DIR}/include )
${CMAKE_CURRENT_SOURCE_DIR}/include )
#---Add Library-------------------------------------------------------------------
if(DD4HEP_USE_BOOST)
#fg: canonical way of finding Boost w/ cmake uses
# -D Boost_DIR=_path_to_boost
# and then FindBoost.cmake sets the variable Boost_INCLUDE_DIR
FIND_PACKAGE( Boost REQUIRED)
include_directories( ${Boost_INCLUDE_DIR})
#list(APPEND include_directories ${BOOST_INCLUDE_DIR})
add_definitions(-DDD4HEP_USE_BOOST)
# MESSAGE( STATUS "Boost_INCLUDE_DIR = ${Boost_INCLUDE_DIR} ")
# MESSAGE( STATUS "include_directories= ${include_directories} ")
endif()
file(GLOB sources src/*.cpp)
if(NOT DD4HEP_USE_XERCESC)
......@@ -52,11 +26,7 @@ add_library(DD4hepG4Legacy SHARED ${legacy_sources})
target_link_libraries(DD4hepG4Legacy DD4hepCore DD4hepG4 ${ROOT_LIBRARIES} Reflex ${Geant4_LIBRARIES})
SET_TARGET_PROPERTIES(DD4hepG4Legacy PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
if(APPLE)
dd4hep_generate_rootmap_apple(DD4hepG4Legacy)
else()
dd4hep_generate_rootmap(DD4hepG4Legacy)
endif()
dd4hep_generate_rootmap(DD4hepG4Legacy)
#--------------------------- New Plugin library for new simulation framework -----
file(GLOB plugins_sources plugins/*.cpp)
......@@ -64,19 +34,13 @@ add_library(DD4hepG4Plugins SHARED ${plugins_sources})
target_link_libraries(DD4hepG4Plugins DD4hepCore DD4hepG4 ${ROOT_LIBRARIES} Reflex ${Geant4_LIBRARIES})
SET_TARGET_PROPERTIES(DD4hepG4Plugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
if(APPLE)
dd4hep_generate_rootmap_apple(DD4hepG4Plugins)
else()
dd4hep_generate_rootmap(DD4hepG4Plugins)
endif()
dd4hep_generate_rootmap(DD4hepG4Plugins)
#--------------------------- LCIO Plugins for new simulation framework -----------
#if(LCIO_DIR)
# list(APPEND include_directories ${LCIO_DIR}/include)
if(DD4HEP_USE_LCIO)
find_package(LCIO REQUIRED)
include_directories( ${LCIO_INCLUDE_DIRS} )
file(GLOB lcio_sources lcio/*.cpp)
add_library(DD4hepG4LCIO SHARED ${lcio_sources})
......@@ -85,6 +49,7 @@ if(DD4HEP_USE_LCIO)
SET_TARGET_PROPERTIES(DD4hepG4LCIO PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
dd4hep_generate_rootmap(DD4hepG4LCIO)
endif()
#-----------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment