File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,20 @@ if(fortran AND CMAKE_Fortran_COMPILER)
5555 ROOT_EXECUTABLE(g2root g2root.f LIBRARIES minicern CMAKENOEXPORT)
5656 set_target_properties (g2root PROPERTIES COMPILE_FLAGS "-w" )
5757 ROOT_EXECUTABLE(h2root h2root.cxx LIBRARIES Core RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore Thread minicern CMAKENOEXPORT)
58+
59+ # This is needed in particular for macOS, where the path of the GNU Fortran
60+ # library might not be in the default DYLD_LIBRARY_PATH, but it gets picked
61+ # up with enable_language(Fortran).
62+ if (APPLE AND CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
63+ # Compute path to quadmath
64+ execute_process (
65+ COMMAND ${CMAKE_Fortran_COMPILER} -print-file-name =libgfortran.dylib
66+ OUTPUT_VARIABLE LIBGFORTRAN_PATH
67+ OUTPUT_STRIP_TRAILING_WHITESPACE)
68+ get_filename_component (LIBGFORTRAN_DIR "${LIBGFORTRAN_PATH} " DIRECTORY )
69+ set_property (TARGET h2root APPEND PROPERTY BUILD_RPATH "${LIBGFORTRAN_DIR} " )
70+ set_property (TARGET h2root APPEND PROPERTY INSTALL_RPATH "${LIBGFORTRAN_DIR} " )
71+ endif ()
5872endif ()
5973
6074file (GLOB utils RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} python/root*)
You can’t perform that action at this time.
0 commit comments