kopia lustrzana https://github.com/OpenDroneMap/ODM
Fix rpath for openmvs
rodzic
808f9e40a2
commit
2b2115c298
|
@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
project(ODM-SuperBuild)
|
project(ODM-SuperBuild)
|
||||||
|
|
||||||
|
# Setup SuperBuild root location
|
||||||
|
set(SB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
message(STATUS "No build type selected, default to Release")
|
message(STATUS "No build type selected, default to Release")
|
||||||
set(CMAKE_BUILD_TYPE "Release")
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
|
@ -28,16 +31,21 @@ if (APPLE)
|
||||||
message("Found Homebrew's compiler: ${CXX_PATH}")
|
message("Found Homebrew's compiler: ${CXX_PATH}")
|
||||||
set(CMAKE_CXX_COMPILER ${CXX_PATH})
|
set(CMAKE_CXX_COMPILER ${CXX_PATH})
|
||||||
set(APPLE_CMAKE_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
|
set(APPLE_CMAKE_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
|
||||||
break()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT APPLE_CMAKE_ARGS)
|
if (NOT APPLE_CMAKE_ARGS)
|
||||||
message(WARNING "Cannot find Homebrew's compiler, compilation might fail...")
|
message(WARNING "Cannot find Homebrew's compiler, compilation might fail...")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
# Setup SuperBuild root location
|
set(INSTALL_NAME_TOOL "${SB_ROOT_DIR}/scripts/macos_fix_rpath.sh")
|
||||||
set(SB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
macro(macos_fix_rpath project library)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${project} POST_BUILD
|
||||||
|
COMMAND ${INSTALL_NAME_TOOL} "SuperBuild/install/lib" ${library}
|
||||||
|
COMMENT "Fixing rpath for ${library}"
|
||||||
|
)
|
||||||
|
endmacro()
|
||||||
|
endif()
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# Setup SuperBuild directories #
|
# Setup SuperBuild directories #
|
||||||
|
|
|
@ -92,12 +92,5 @@ ExternalProject_Add(${_proj_name}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(INSTALL_NAME_TOOL "${SB_ROOT_DIR}/scripts/macos_fix_rpath.sh")
|
macos_fix_rpath(${_proj_name} "${SB_INSTALL_DIR}/lib/python3.8/dist-packages/cv2/python-3.8/cv2.cpython-38-darwin.so")
|
||||||
set(CV2_BINDINGS "${SB_INSTALL_DIR}/lib/python3.8/dist-packages/cv2/python-3.8/cv2.cpython-38-darwin.so")
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
TARGET ${_proj_name} POST_BUILD
|
|
||||||
COMMAND ${INSTALL_NAME_TOOL} "SuperBuild/install/lib" ${CV2_BINDINGS}
|
|
||||||
COMMENT "Fixing rpath for Python bindings"
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
|
@ -77,3 +77,9 @@ ExternalProject_Add(${_proj_name}
|
||||||
LOG_CONFIGURE OFF
|
LOG_CONFIGURE OFF
|
||||||
LOG_BUILD OFF
|
LOG_BUILD OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
macos_fix_rpath(${_proj_name} "${SB_INSTALL_DIR}/bin/OpenMVS/DensifyPointCloud")
|
||||||
|
macos_fix_rpath(${_proj_name} "${SB_INSTALL_DIR}/bin/OpenMVS/ReconstructMesh")
|
||||||
|
endif()
|
Ładowanie…
Reference in New Issue