Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ssheorey committed Aug 12, 2024
1 parent 5f606b8 commit 41dfe66
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cpp/open3d/cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
execute_process(COMMAND "@CMAKE_COMMAND@" "-E remove \"$ENV{DESTDIR}${file}\""
execute_process(COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${file}"
RESULT_VARIABLE rm_retval)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
Expand Down
6 changes: 3 additions & 3 deletions cpp/pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ set(PYTHON_COMPILED_MODULE_DIR

# Set BUILD_RPATH to find tbb (and a shared libOpen3D). We don't install through cmake.
if (APPLE)
set_target_properties(pybind PROPERTIES BUILD_RPATH "@loader_path:@loader_path/..")
set_target_properties(pybind PROPERTIES BUILD_RPATH "@loader_path;@loader_path/..")
elseif (UNIX)
set_target_properties(pybind PROPERTIES BUILD_RPATH "$ORIGIN:$ORIGIN/..")
set_target_properties(pybind PROPERTIES BUILD_RPATH "$ORIGIN;$ORIGIN/..")
endif()
set_target_properties(pybind PROPERTIES
FOLDER "Python"
LIBRARY_OUTPUT_DIRECTORY "${PYTHON_COMPILED_MODULE_DIR}"
ARCHIVE_OUTPUT_DIRECTORY "${PYTHON_COMPILED_MODULE_DIR}")

if (BUILD_SHARED_LIBS)
if (WIN32) # WIN32 Open3D is not versioned yet
if (WIN32) # CMake does not add soversion suffix to WIN32 DLLs
set(_libopen3d_soname "Open3D.dll")
elseif(APPLE)
set(_libopen3d_soname "libOpen3D.${OPEN3D_ABI_VERSION}.dylib")
Expand Down
10 changes: 5 additions & 5 deletions examples/cmake/open3d-cmake-find-package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ target_link_libraries(Draw PRIVATE Open3D::Open3D)
# On Windows if BUILD_SHARED_LIBS is enabled, copy .dll files to the executable directory
if(WIN32)
get_target_property(open3d_type Open3D::Open3D TYPE)
message(STATUS "Copying Open3D DLLs to ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
if(open3d_type STREQUAL "SHARED_LIBRARY")
set(copy_dlls ${CMAKE_INSTALL_PREFIX}/bin/tbb12.dll
${CMAKE_INSTALL_PREFIX}/bin/Open3D.dll)
set(copy_dlls "${CMAKE_INSTALL_PREFIX}/bin/tbb12$<$<CONFIG:Debug>:_debug>.dll"
"${CMAKE_INSTALL_PREFIX}/bin/Open3D.dll")
else()
set(copy_dlls ${CMAKE_INSTALL_PREFIX}/bin/tbb12.dll)
set(copy_dlls "${CMAKE_INSTALL_PREFIX}/bin/tbb12$<$<CONFIG:Debug>:_debug>.dll")
endif()
add_custom_command(TARGET Draw POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${copy_dlls}
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>)
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>
COMMENT "Copying Open3D DLLs to ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
endif()

0 comments on commit 41dfe66

Please sign in to comment.