Skip to content

Commit

Permalink
Use VMC standalone if found
Browse files Browse the repository at this point in the history
* account for VMC standalone
  • Loading branch information
Benedikt Volkel authored and ktf committed Dec 10, 2021
1 parent e0119c3 commit 4d361ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion GeneratorCosmics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ find_package(ROOT REQUIRED COMPONENTS EG)
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
include(${ROOT_USE_FILE})

#---VMC
# set by VMC standalone, in ROOT case we don't use it
set(VMC_LIBRARIES)
if(NOT ROOT_vmc_FOUND)
find_package(VMC REQUIRED)
endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.)

set(HEADERS GeneratorCosmics.h)
Expand All @@ -20,7 +27,7 @@ ROOT_GENERATE_DICTIONARY(G__GeneratorCosmics ${HEADERS} LINKDEF GeneratorCosmics

#---Create a shared library with geneated dictionary
add_library(GeneratorCosmics SHARED GeneratorCosmics.cxx G__GeneratorCosmics.cxx)
target_link_libraries(GeneratorCosmics ${ROOT_LIBRARIES})
target_link_libraries(GeneratorCosmics ${ROOT_LIBRARIES} ${VMC_LIBRARIES})


set_target_properties(GeneratorCosmics
Expand Down
9 changes: 8 additions & 1 deletion GeneratorParam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ find_package(ROOT REQUIRED COMPONENTS EG)
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
include(${ROOT_USE_FILE})

#---VMC
# set by VMC standalone, in ROOT case we don't use it
set(VMC_LIBRARIES)
if(NOT ROOT_vmc_FOUND)
find_package(VMC REQUIRED)
endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.)

set(HEADERS GeneratorParam.h GeneratorParamLibBase.h GeneratorParamMUONlib.h GeneratorParamEMlib.h PythiaDecayerConfig.h)
Expand All @@ -20,7 +27,7 @@ ROOT_GENERATE_DICTIONARY(G__GeneratorParam ${HEADERS} LINKDEF GeneratorParamLink

#---Create a shared library with geneated dictionary
add_library(GeneratorParam SHARED GeneratorParam.cxx GeneratorParamLibBase.cxx GeneratorParamMUONlib.cxx GeneratorParamEMlib.cxx PythiaDecayerConfig.cxx G__GeneratorParam.cxx)
target_link_libraries(GeneratorParam ${ROOT_LIBRARIES})
target_link_libraries(GeneratorParam ${ROOT_LIBRARIES} ${VMC_LIBRARIES})


set_target_properties(GeneratorParam
Expand Down

0 comments on commit 4d361ee

Please sign in to comment.