Skip to content
Snippets Groups Projects
Commit dbf44209 authored by Marko Petric's avatar Marko Petric Committed by Andre Sailer
Browse files

Use generic Python find package

parent bd212097
No related branches found
No related tags found
No related merge requests found
...@@ -50,8 +50,8 @@ dd4hep_add_plugin(DDG4Plugins ...@@ -50,8 +50,8 @@ dd4hep_add_plugin(DDG4Plugins
#--------------------------- Plugin library for the simulation framework --------- #--------------------------- Plugin library for the simulation framework ---------
find_package(Python2 COMPONENTS Development) find_package(Python COMPONENTS Development)
if(TARGET Python2::Python) if(TARGET Python::Python)
dd4hep_print("|++> Python found, creating DDG4Python Dictionary") dd4hep_print("|++> Python found, creating DDG4Python Dictionary")
dd4hep_add_dictionary(G__DDG4Python dd4hep_add_dictionary(G__DDG4Python
SOURCES src/python/DDG4Python.C SOURCES src/python/DDG4Python.C
...@@ -59,14 +59,14 @@ if(TARGET Python2::Python) ...@@ -59,14 +59,14 @@ if(TARGET Python2::Python)
) )
dd4hep_add_dictionary(G__DDPython dd4hep_add_dictionary(G__DDPython
SOURCES tpython/DDPython.C SOURCES tpython/DDPython.C
USES Python2::Python USES Python::Python
) )
if(TARGET ROOT::PyROOT) if(TARGET ROOT::PyROOT)
#--------------------------- Specialized python plugins -------------------------- #--------------------------- Specialized python plugins --------------------------
dd4hep_print("|++> ROOT Has Python, creating DDPython library and plugins") dd4hep_print("|++> ROOT Has Python, creating DDPython library and plugins")
add_library(DDPython SHARED G__DDPython.cxx tpython/DDPython.cpp) add_library(DDPython SHARED G__DDPython.cxx tpython/DDPython.cpp)
add_library(DD4hep::DDPython ALIAS DDPython) add_library(DD4hep::DDPython ALIAS DDPython)
target_link_libraries(DDPython DD4hep::DDG4 ROOT::Core Python2::Python ROOT::PyROOT) target_link_libraries(DDPython DD4hep::DDG4 ROOT::Core Python::Python ROOT::PyROOT)
IF(${CMAKE_CXX_STANDARD} GREATER 16) IF(${CMAKE_CXX_STANDARD} GREATER 16)
# python header not cxx17 compatible, gives error in clang # python header not cxx17 compatible, gives error in clang
target_compile_options(DDPython PUBLIC -Wno-register) target_compile_options(DDPython PUBLIC -Wno-register)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment