Skip to content
Snippets Groups Projects
Commit 7671efdb authored by Dmitry Romanov's avatar Dmitry Romanov
Browse files

While find_package is commented out (I guess because of some discovery issues) find_library approach would have the same functionality but also allow to put CMake flag -DActs_ROOT... to set ACTS directory if it is not in the standard place. Acts_ROOT - is the recommended name by CMP0074 cmake policy
parent 7e746039
1 merge request!31Draft: Resolve "Make detector compile and correctly work on gcc 9.3 ubuntu 20.04"
Pipeline #7898 failed
...@@ -2,10 +2,12 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR) ...@@ -2,10 +2,12 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
PROJECT(reference_detector PROJECT(reference_detector
VERSION 0.0.1 VERSION 0.0.1
LANGUAGES CXX LANGUAGES CXX
DESCRIPTION "A template dd4hep+acts detector" DESCRIPTION "EIC Reference Detector (via dd4hep+acts)"
) )
find_package( DD4hep REQUIRED COMPONENTS DDCore DDG4 ) find_package( DD4hep REQUIRED COMPONENTS DDCore DDG4 )
find_library(ACTS_CORE_LIBRARY NAMES ActsCore HINTS ${Acts_ROOT} $ENV{Acts_ROOT} PATH_SUFFIXES lib lib64)
find_library(ACTS_PLUGIN_DD4HEP_LIBRARY NAMES ActsPluginDD4hep HINTS ${Acts_ROOT} $ENV{Acts_ROOT} PATH_SUFFIXES lib lib64)
#find_package(Acts REQUIRED COMPONENTS Core IdentificationPlugin TGeoPlugin DD4hepPlugin PATHS /home/whit/lib/cmake NO_DEFAULT_PATH) #find_package(Acts REQUIRED COMPONENTS Core IdentificationPlugin TGeoPlugin DD4hepPlugin PATHS /home/whit/lib/cmake NO_DEFAULT_PATH)
#find_package(Acts REQUIRED COMPONENTS Core PluginIdentification PluginTGeo PluginDD4hep ) #find_package(Acts REQUIRED COMPONENTS Core PluginIdentification PluginTGeo PluginDD4hep )
...@@ -16,7 +18,7 @@ set(a_lib_name reference_detector) ...@@ -16,7 +18,7 @@ set(a_lib_name reference_detector)
dd4hep_configure_output() dd4hep_configure_output()
dd4hep_add_plugin(${a_lib_name} SOURCES src/*.cpp dd4hep_add_plugin(${a_lib_name} SOURCES src/*.cpp
USES ActsCore ActsPluginDD4hep USES ${ACTS_CORE_LIBRARY} ${ACTS_PLUGIN_DD4HEP_LIBRARY}
) )
target_link_libraries(${a_lib_name} target_link_libraries(${a_lib_name}
PUBLIC DD4hep::DDCore DD4hep::DDRec PUBLIC DD4hep::DDCore DD4hep::DDRec
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment