Skip to content

Commit

Permalink
Introduce variable for python install dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Petric committed Oct 14, 2019
1 parent 7c5813d commit 6ec388f
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ dd4hep_configure_output( OUTPUT "${PROJECT_BINARY_DIR}" INSTALL "${CMAKE_INSTALL

# Configure Python
find_package(Python COMPONENTS Development)
set(DD4HEP_PYTHON_INSTALL_DIR lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)

# Configure ROOT
find_package (ROOT 6.08 REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion DDCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ ENDIF()

# install python files
file(GLOB DDCore_Python python/*.py)
install(FILES ${DDCore_Python} DESTINATION lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)
install(FILES ${DDCore_Python} DESTINATION ${DD4HEP_PYTHON_INSTALL_DIR})

# install header files
install(DIRECTORY
Expand Down
2 changes: 1 addition & 1 deletion DDDigi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dd4hep_add_plugin(DDDigiPlugins
set_target_properties(DDDigi DDDigiPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})

file(GLOB DDigi_python python/*.py python/*.C)
install(FILES ${DDigi_python} DESTINATION lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)
install(FILES ${DDigi_python} DESTINATION ${DD4HEP_PYTHON_INSTALL_DIR})
install(TARGETS DDDigi DDDigiPlugins EXPORT DD4hep LIBRARY DESTINATION lib)
install(DIRECTORY include/DDDigi DESTINATION include)

4 changes: 2 additions & 2 deletions DDG4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ target_link_libraries(g4FromXML DDG4)

#---Package installation procedure(s) ----------------------------------------------
file(GLOB DDG4_python python/*.py python/*.C)
install(FILES ${DDG4_python} DESTINATION lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)
install(FILES ${DDG4_python} DESTINATION ${DD4HEP_PYTHON_INSTALL_DIR})

install(PROGRAMS python/DDSim/bin/ddsim.py DESTINATION bin RENAME ddsim)

install(PROGRAMS python/bin/checkOverlaps.py DESTINATION bin RENAME checkOverlaps)
install(PROGRAMS python/bin/checkGeometry.py DESTINATION bin RENAME checkGeometry)
install(PROGRAMS python/bin/g4MaterialScan.py DESTINATION bin RENAME g4MaterialScan)

install(DIRECTORY python/DDSim DESTINATION lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)
install(DIRECTORY python/DDSim DESTINATION ${DD4HEP_PYTHON_INSTALL_DIR})

install(DIRECTORY examples DESTINATION examples/DDG4)

Expand Down
2 changes: 1 addition & 1 deletion DDRec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ endif()
set_target_properties(DDRec DDRecPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})

file(GLOB DDRec_python python/*.py)
install(FILES ${DDRec_python} DESTINATION lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)
install(FILES ${DDRec_python} DESTINATION ${DD4HEP_PYTHON_INSTALL_DIR})
install(DIRECTORY include/DDRec DESTINATION include)
install(TARGETS DDRec DDRecPlugins EXPORT DD4hep LIBRARY DESTINATION lib)
2 changes: 1 addition & 1 deletion cmake/thisdd4hep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ dd4hep_add_path PATH ${THIS}/bin;
#----LIBRARY_PATH-------------------------------------------------------------
dd4hep_add_library_path ${THIS}/lib;
#----PYTHONPATH---------------------------------------------------------------
dd4hep_add_path PYTHONPATH ${THIS}/lib/python@Python_VERSION_MAJOR@.@Python_VERSION_MINOR@/site-packages;
dd4hep_add_path PYTHONPATH ${THIS}/@DD4HEP_PYTHON_INSTALL_DIR@;
#----ROOT_INCLUDE_PATH--------------------------------------------------------
dd4hep_add_path ROOT_INCLUDE_PATH ${THIS}/include;
#-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cmake/thisdd4hep_only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dd4hep_add_path PATH ${THIS}/bin;
#----LIBRARY_PATH-------------------------------------------------------------
dd4hep_add_library_path ${THIS}/lib;
#----PYTHONPATH---------------------------------------------------------------
dd4hep_add_path PYTHONPATH ${THIS}/lib/python@Python_VERSION_MAJOR@.@Python_VERSION_MINOR@/site-packages;
dd4hep_add_path PYTHONPATH ${THIS}/@DD4HEP_PYTHON_INSTALL_DIR@;
#----ROOT_INCLUDE_PATH--------------------------------------------------------
dd4hep_add_path ROOT_INCLUDE_PATH ${THIS}/include;
#-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cmake/thisdd4hep_package.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dd4hep_parse_this ${BASH_ARGV[0]} @PackageName@;
#----PATH---------------------------------------------------------------------
dd4hep_add_path PATH ${THIS}/bin;
#----PYTHONPATH---------------------------------------------------------------
dd4hep_add_path PYTHONPATH ${THIS}/lib/python@Python_VERSION_MAJOR@.@Python_VERSION_MINOR@/site-packages;
dd4hep_add_path PYTHONPATH ${THIS}/@DD4HEP_PYTHON_INSTALL_DIR@;
#----ROOT_INCLUDE_PATH--------------------------------------------------------
dd4hep_add_path ROOT_INCLUDE_PATH ${THIS}/include;
#----LIBRARY_PATH-------------------------------------------------------------
Expand Down

0 comments on commit 6ec388f

Please sign in to comment.