diff --git a/UtilityApps/CMakeLists.txt b/UtilityApps/CMakeLists.txt index 88368cb927178142772ea0f37069008e2496b0fa..9e12263886a83fb5d43dd7613c07b43813bcda8e 100644 --- a/UtilityApps/CMakeLists.txt +++ b/UtilityApps/CMakeLists.txt @@ -29,22 +29,27 @@ dd4hep_add_executable(test_surfaces USES DDRec DDTest OPTIONAL [LCIO REQUIRED SOURCES src/test_surfaces.cpp]) #----------------------------------------------------------------------------------- -dd4hep_add_dictionary( G__teve +dd4hep_add_dictionary( G__teve SOURCES src/EvNavHandler.h LINKDEF src/LinkDef.h ) #----------------------------------------------------------------------------------- if ( ${DD4HEP_USE_LCIO} ) + dd4hep_add_dictionary( G__teve1 + SOURCES src/EvNavHandler.h + LINKDEF src/LinkDef.h ) dd4hep_add_executable( teveLCIO USES [ROOT REQUIRED COMPONENTS TEve] [LCIO REQUIRED] DDRec - SOURCES G__teve.cxx src/teve_display.cpp src/next_event_lcio.cpp + GENERATED G__teve1.cxx + SOURCES src/teve_display.cpp src/next_event_lcio.cpp ) endif() #----------------------------------------------------------------------------------- dd4hep_add_executable( teveDisplay USES [ROOT REQUIRED COMPONENTS TEve] DDRec - SOURCES src/teve_display.cpp src/next_event_dummy.cpp G__teve.cxx + GENERATED G__teve.cxx + SOURCES src/teve_display.cpp src/next_event_dummy.cpp ) diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index 2737c07d6f98a1a366ff1788b68bbf7ae133dd7c..7f71544b50729f2e6be7dbe31eaf838fe3f14e08 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -1106,7 +1106,7 @@ function ( dd4hep_add_executable binary ) set_source_files_properties( ${f} PROPERTIES COMPILE_FLAGS -Wno-unused-function GENERATED TRUE ) endforeach() # - set ( sources ${GENERATED} ${ARG_SOURCES} ${optional_sources} ) + set ( sources ${ARG_GENERATED} ${ARG_SOURCES} ${optional_sources} ) # if( NOT "${sources}" STREQUAL "") set (incs ${LOCAL_INCLUDE_DIRS} ${ARG_INCLUDE_DIRS} ) @@ -1148,7 +1148,7 @@ function( dd4hep_add_dictionary dictionary ) if ( "${enabled}" STREQUAL "OFF" ) dd4hep_skipmsg ( "${tag} DISBALED -- package is not built!" ) else() - cmake_parse_arguments(ARG "" "" "SOURCES;EXCLUDE;LINKDEF;OPTIONS;OPTIONAL" ${ARGN} ) + cmake_parse_arguments(ARG "" "" "SOURCES;EXCLUDE;LINKDEF;OPTIONS;OPTIONAL;INCLUDES" ${ARGN} ) dd4hep_print ( "|++> ${tag} Building dictionary ..." ) if("${ARG_LINKDEF}" STREQUAL "") set(ARG_LINKDEF "${CMAKE_SOURCE_DIR}/DDCore/include/ROOT/LinkDef.h") @@ -1184,6 +1184,9 @@ function( dd4hep_add_dictionary dictionary ) endforeach() # set ( inc_dirs -I${CMAKE_CURRENT_SOURCE_DIR}/include ) + foreach ( inc ${ARG_INCLUDES} ) + set ( inc_dirs ${inc_dirs} -I${inc} ) + endforeach() foreach ( inc ${incs} ) file ( GLOB inc ${inc} ) set ( inc_dirs ${inc_dirs} -I${inc} )