Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Adding a CMake option to add a custom DLL folder for wheel usage in build #1871

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ project(pyf3d)

option(F3D_BINDINGS_PYTHON_GENERATE_STUBS "Generate Python stubs" OFF)

if (WIN32)
set(F3D_BINDINGS_PYTHON_WINDOWS_BUILD_DLL_FIXUP "" CACHE STRING "Path to folder containing DLLs to point to when using the Python wheels from build")
mark_as_advanced(F3D_BINDINGS_PYTHON_WINDOWS_BUILD_DLL_FIXUP)
endif ()

list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(GNUInstallDirs)
include(f3dPython)
Expand Down Expand Up @@ -59,7 +64,7 @@ if(WIN32)
if(PROJECT_IS_TOP_LEVEL)
f3d_python_windows_dll_fixup(PATHS "$<TARGET_FILE_DIR:f3d::libf3d>" OUTPUT F3D_ABSOLUTE_DLLS_FIXUP)
else()
set(f3d_win_dll_paths "$<TARGET_FILE_DIR:VTK::CommonCore>")
set(f3d_win_dll_paths "${F3D_BINDINGS_PYTHON_WINDOWS_BUILD_DLL_FIXUP}" "$<TARGET_FILE_DIR:VTK::CommonCore>")
if(BUILD_SHARED_LIBS)
list(APPEND f3d_win_dll_paths "$<TARGET_FILE_DIR:libf3d>")
endif()
Expand Down
Loading