File tree Expand file tree Collapse file tree 3 files changed +14
-13
lines changed
Expand file tree Collapse file tree 3 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -149,21 +149,22 @@ if (BUILD_PYTHON_MODULE)
149149 target_link_libraries (${PYBINDMODULE_NAME} PRIVATE ${SHARED_LIB_NAME} )
150150 target_include_directories (${PYBINDMODULE_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /src)
151151
152+ # copy the pyd file to the pypi directory
152153 add_custom_command (TARGET ${PYBINDMODULE_NAME} POST_BUILD
153154 COMMAND ${CMAKE_COMMAND} -E copy_if_different
154155 $<TARGET_FILE:${PYBINDMODULE_NAME} >
155156 ${PYPI_DIR}
156157 )
157158
158- add_custom_command ( TARGET ${PYBINDMODULE_NAME} POST_BUILD
159- COMMAND ${CMAKE_COMMAND} -E copy_if_different
160- $<TARGET_FILE: ${SHARED_LIB_NAME} >
161- ${ TARGET_DLL_PYPI_DIR}
162- )
163- # TODO: for open3d-dll is working but it should be done in a more elegant way
164- add_custom_command ( TARGET ${PYBINDMODULE_NAME} POST_BUILD
165- COMMAND ${CMAKE_COMMAND} -E copy_if_different
166- $<TARGET_FILE:Open3D::Open3D>
167- ${TARGET_DLL_PYPI_DIR}
168- )
159+ # get all the files -dlls in the bin directory and copy them one by one to the pypi directory
160+ file (GLOB files ${CMAKE_BINARY_DIR} /bin/Release/*.dll)
161+ foreach (file ${files} )
162+ message ( STATUS "Copying ${file} to ${ TARGET_DLL_PYPI_DIR}" )
163+ add_custom_command ( TARGET ${PYBINDMODULE_NAME} POST_BUILD
164+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
165+ ${file}
166+ ${TARGET_DLL_PYPI_DIR}
167+ )
168+ endforeach ()
169+
169170endif ()
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ REM clean the build directory and reconfigure it
55rmdir /s /q build
66
77REM configure the project
8- cmake -S . -B build
8+ cmake -S . -B build -A x64
Submodule
eigen updated from 0ee5c90 to c1d6374
You can’t perform that action at this time.
0 commit comments