From c3d852338ba161e407d0127c49724e23de5500fe Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Wed, 17 Jul 2019 13:50:58 +0200
Subject: [PATCH] Remove use of GEANT4_INCLUDE_DIRS, use target library instead

---
 DDG4/CMakeLists.txt    |  8 ++------
 cmake/FindPYTHON.cmake | 15 ---------------
 2 files changed, 2 insertions(+), 21 deletions(-)
 delete mode 100644 cmake/FindPYTHON.cmake

diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt
index 6963d331a..d68d01a26 100644
--- a/DDG4/CMakeLists.txt
+++ b/DDG4/CMakeLists.txt
@@ -51,9 +51,7 @@ new_dd4hep_add_plugin(DDG4Legacy  SOURCES legacy/*.cpp
 #-----------------------------------------------------------------------------------
 new_dd4hep_add_dictionary( G__DDG4
   SOURCES python/DDG4Dict.C
-  DEPENDS DDCore DDParsers DDG4
-  INCLUDES ${Geant4_INCLUDE_DIRS} 
-  DEFINITIONS ${Geant4_DEFINITIONS}
+  DEPENDS DDCore DDParsers DDG4 Geant4::Interface
   )
 #---------------------------  Plugin library for the simulation framework  ---------
 new_dd4hep_add_plugin(DDG4Plugins
@@ -68,9 +66,7 @@ if(PYTHONLIBS_FOUND)
   MESSAGE(STATUS "Python found, creating DDG4Python Dictionary")
   new_dd4hep_add_dictionary(G__DDG4Python
     SOURCES src/python/DDG4Python.C
-    DEPENDS DDCore DDParsers DDG4 ROOT::Core
-    INCLUDES ${Geant4_INCLUDE_DIRS}  ${PYTHON_INCLUDE_DIRS}
-    DEFINITIONS ${Geant4_DEFINITIONS}
+    DEPENDS DDCore DDParsers DDG4 ROOT::Core Geant4::Interface
     )
   new_dd4hep_add_dictionary(G__DDPython
     SOURCES tpython/DDPython.C
diff --git a/cmake/FindPYTHON.cmake b/cmake/FindPYTHON.cmake
deleted file mode 100644
index 5c3ca4609..000000000
--- a/cmake/FindPYTHON.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-include ( FindPackageHandleStandardArgs )
-
-find_package(PythonInterp 2 REQUIRED)
-find_package(PythonLibs   2 REQUIRED)
-
-if (PYTHONLIBS_FOUND)
-  get_filename_component(PYTHON_LIBRARY_DIR  ${PYTHON_LIBRARIES} PATH)
-  set(PYTHON_LIBRARY_DIR  ${PYTHON_LIBRARY_DIR})
-  set(PYTHON_LIBRARIES    ${PYTHON_LIBRARIES})
-  set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
-else()
-  message(STATUS "PYTHON ****NOT**** FOUND")
-endif()
-find_package_handle_standard_args(PYTHON DEFAULT_MSG PYTHON_INCLUDE_DIR)
-mark_as_advanced(PYTHON_FOUND PYTHON_INCLUDE_DIRS)
-- 
GitLab