diff --git a/GeneratorCosmics/CMakeLists.txt b/GeneratorCosmics/CMakeLists.txt index 2c1fe23..34df44e 100644 --- a/GeneratorCosmics/CMakeLists.txt +++ b/GeneratorCosmics/CMakeLists.txt @@ -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) @@ -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 diff --git a/GeneratorParam/CMakeLists.txt b/GeneratorParam/CMakeLists.txt index 86ce92d..ca363d4 100644 --- a/GeneratorParam/CMakeLists.txt +++ b/GeneratorParam/CMakeLists.txt @@ -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) @@ -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