Back to home page

EIC code displayed by LXR

 
 

    


Warning, /acts/Python/Core/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # Configure setup and install python files
0002 set(_python_dir "${CMAKE_BINARY_DIR}/python")
0003 file(MAKE_DIRECTORY ${_python_dir})
0004 file(MAKE_DIRECTORY ${_python_dir}/acts)
0005 set(_python_install_dir "python/acts")
0006 
0007 set(py_files __init__.py _adapter.py)
0008 
0009 pybind11_add_module(ActsPythonBindings src/CoreModuleEntry.cpp)
0010 
0011 target_sources(
0012     ActsPythonBindings
0013     PRIVATE
0014         src/Definitions.cpp
0015         src/Utilities.cpp
0016         src/MagneticField.cpp
0017         src/Material.cpp
0018         src/Surfaces.cpp
0019         src/Geometry.cpp
0020         src/GeometryGen1.cpp
0021         src/GeometryGen2.cpp
0022         src/GeometryGen3.cpp
0023         src/Navigation.cpp
0024         src/Propagation.cpp
0025         src/Seeding.cpp
0026         src/TrackFinding.cpp
0027         src/Visualization.cpp
0028 )
0029 
0030 install(TARGETS ActsPythonBindings DESTINATION ${_python_install_dir})
0031 
0032 set_target_properties(
0033     ActsPythonBindings
0034     PROPERTIES INSTALL_RPATH "\$ORIGIN/../../${CMAKE_INSTALL_LIBDIR}"
0035 )
0036 set_target_properties(
0037     ActsPythonBindings
0038     PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${_python_dir}/acts
0039 )
0040 
0041 target_link_libraries(
0042     ActsPythonBindings
0043     PUBLIC Acts::Core Acts::PythonUtilities
0044 )
0045 
0046 configure_file(setup.sh.in ${_python_dir}/setup.sh @ONLY)
0047 install(FILES ${_python_dir}/setup.sh DESTINATION "python")
0048 
0049 foreach(f ${py_files})
0050     set(_target ${_python_dir}/acts/${f})
0051     get_filename_component(_dir ${_target} DIRECTORY)
0052     file(MAKE_DIRECTORY ${_dir})
0053 
0054     file(
0055         CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/python/${f} ${_target}
0056         SYMBOLIC
0057     )
0058 
0059     get_filename_component(_rel ${f} DIRECTORY)
0060 
0061     install(
0062         FILES ${CMAKE_CURRENT_SOURCE_DIR}/python/${f}
0063         DESTINATION ${_python_install_dir}/${_rel}
0064     )
0065 endforeach()