diff --git a/DDCore/CMakeLists.txt b/DDCore/CMakeLists.txt index 1d5621f60569bf43f75325ce608070b2c8a676f7..5527aac2681e4853c61f0acb5783ae349d874008 100644 --- a/DDCore/CMakeLists.txt +++ b/DDCore/CMakeLists.txt @@ -126,10 +126,10 @@ ELSE() ENDIF() #--------------------------- Specialized PYTHON plugin ---------------------------- -IF(TARGET ${DD4HEP_ROOT_PYTHON}) +IF(TARGET ROOT::ROOTTPython) dd4hep_add_plugin(DDPythonPlugins SOURCES src/python/*.cpp - USES DDCore ROOT::Core ${DD4HEP_ROOT_PYTHON} + USES DDCore ROOT::Core ROOT::ROOTTPython ) set_target_properties(DDPythonPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) LIST(APPEND OPTIONAL_TARGETS DDPythonPlugins) diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt index 4813dd28e1ca77db19cf3ea9655f72665fe580f1..33dd559ccd75a3b2df40d66fc69091272791abe9 100644 --- a/DDG4/CMakeLists.txt +++ b/DDG4/CMakeLists.txt @@ -53,7 +53,7 @@ dd4hep_add_plugin(DDG4Plugins ) #--------------------------- Plugin library for the simulation framework --------- -if(TARGET Python::Python AND TARGET ${DD4HEP_ROOT_PYTHON}) +if(TARGET Python::Python AND TARGET ROOT::ROOTTPython) dd4hep_print("|++> Python found, creating DDG4Python Dictionary") dd4hep_add_dictionary(G__DDG4Python SOURCES src/python/DDG4Python.C @@ -67,7 +67,7 @@ if(TARGET Python::Python AND TARGET ${DD4HEP_ROOT_PYTHON}) dd4hep_print("|++> ROOT Has Python, creating DDPython library and plugins") add_library(DDPython G__DDPython.cxx tpython/DDPython.cpp) add_library(DD4hep::DDPython ALIAS DDPython) - target_link_libraries(DDPython DD4hep::DDG4 ROOT::Core Python::Python ${DD4HEP_ROOT_PYTHON}) + target_link_libraries(DDPython DD4hep::DDG4 ROOT::Core Python::Python ROOT::ROOTTPython) IF(${CMAKE_CXX_STANDARD} GREATER 16) # python header not cxx17 compatible, gives error in clang target_compile_options(DDPython PUBLIC -Wno-register) @@ -79,7 +79,7 @@ if(TARGET Python::Python AND TARGET ${DD4HEP_ROOT_PYTHON}) ) #---Helper to overcome deficiency of the python executable concerning multi-threading add_executable(pyddg4 pyddg4.cpp) - target_link_libraries(pyddg4 PUBLIC DD4hep::DDPython ROOT::Core ${DD4HEP_ROOT_PYTHON}) + target_link_libraries(pyddg4 PUBLIC DD4hep::DDPython ROOT::Core ROOT::ROOTTPython) # install these libraries set_target_properties(DDPython DDG4Python PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index e2829a8ebf3f12fc1076da85db6cec6a8aaa3e93..d28959a480ea5ea5b19a975f787f77bca60e9d94 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -730,13 +730,6 @@ macro(DD4HEP_SETUP_ROOT_TARGETS) SET(DD4HEP_PYTHON_INSTALL_DIR lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages) - # root python changes target name in 6.22 - IF(TARGET ROOT::PyROOT) - SET(DD4HEP_ROOT_PYTHON ROOT::PyROOT) - ELSEIF(TARGET ROOT::ROOTTPython) - # New "pyroot" in 6.22 - SET(DD4HEP_ROOT_PYTHON ROOT::ROOTTPython) - ENDIF() #ROOT CXX Flags are a string with quotes, not a list, so we need to convert to a list... string(REPLACE " " ";" DD4HEP_ROOT_CXX_FLAGS ${ROOT_CXX_FLAGS})