Commit 184d0526 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

PKG: OSX: run custom rule after install target for rpath

parent f4fdeeb2
......@@ -75,6 +75,8 @@ else()
add_dependencies(FFTW ${projFloat})
FIX_RPATH_FOR_AUTOCONF_BUILD(FFTW "libfftw3*dylib")
set(_SB_FFTW_INCLUDE_PATH ${SB_INSTALL_PREFIX}/include)
endif()
......
......@@ -60,6 +60,8 @@ else()
INSTALL_COMMAND $(MAKE) install
)
FIX_RPATH_FOR_AUTOCONF_BUILD(GDAL "libgdal*.dylib")
else(MSVC)
##add libkml
##https://trac.osgeo.org/gdal/ticket/5725
......
......@@ -75,6 +75,8 @@ else()
DEPENDS ${OPENCV_DEPENDENCIES}
)
FIX_RPATH_FOR_AUTOCONF_BUILD(OPENCV "libopencv_*.dylib")
set(_SB_OpenCV_DIR ${SB_INSTALL_PREFIX}/share/OpenCV)
endif()
endif()
......@@ -71,6 +71,9 @@ else()
DEPENDEES patch
DEPENDERS configure )
FIX_RPATH_FOR_AUTOCONF_BUILD(OSSIM "libossim*.dylib")
set(_SB_OSSIM_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_OSSIM_LIBRARY ${SB_INSTALL_PREFIX}/lib/ossim.lib)
......
......@@ -67,7 +67,9 @@ else()
${PROJ_SB_SRC} ${PROJ_SB_BUILD_DIR}
DEPENDEES patch update
DEPENDERS configure
)
)
FIX_RPATH_FOR_AUTOCONF_BUILD(PROJ "libproj*.dylib")
endif()
set(_SB_PROJ_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
......
......@@ -82,6 +82,9 @@ if(NOT __EXTERNAL_QT4__)
)
endif()
FIX_RPATH_FOR_AUTOCONF_BUILD(QT4 "libQt*.dylib")
set(_SB_QT_QMAKE_EXECUTABLE ${SB_INSTALL_PREFIX}/bin/qmake)
endif()
......
......@@ -142,4 +142,27 @@ macro(SUPERBUILD_PATCH_SOURCE project external_project_step_name)
DEPENDEES patch update
DEPENDERS configure
)
endmacro()
endmacro(SUPERBUILD_PATCH_SOURCE)
#used only for OSX. DEPENDEES is always install target
macro(FIX_RPATH_FOR_AUTOCONF_BUILD project pattern)
if(APPLE)
find_program(INSTALL_NAME_TOOL_PROGRAM NAMES install_name_tool)
if(INSTALL_NAME_TOOL_PROGRAM)
file(GLOB dylib_names ${SB_INSTALL_PREFIX}/lib/${pattern})
foreach(dylib_name ${dylib_names})
get_filename_component(dylib_name_base_name ${dylib_name} NAME)
ExternalProject_Add_Step(${project} fix_rpath_${dylib_name_base_name}
COMMAND
${INSTALL_NAME_TOOL_PROGRAM}
-id
"@rpath/${dylib_name_base_name}"
"${dylib_name}"
DEPENDEES install)
endforeach()
else()
message(FATAL_ERROR "Cannot find install_name_tool. Tried names: install_name_tool")
endif()
endif()
endmacro(FIX_RPATH_FOR_AUTOCONF_BUILD)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment