From 75a2511e26cf71d1a306ac79fdcb2d1bc6314490 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Sat, 4 Jan 2025 12:13:51 +0100 Subject: [PATCH] adding a F3D_BINDINGS_PYTHON_WINDOWS_BUILD_DLL_FIXUP cmake option --- python/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 45b43eb094..b409706e58 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -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) @@ -59,7 +64,7 @@ if(WIN32) if(PROJECT_IS_TOP_LEVEL) f3d_python_windows_dll_fixup(PATHS "$" OUTPUT F3D_ABSOLUTE_DLLS_FIXUP) else() - set(f3d_win_dll_paths "$") + set(f3d_win_dll_paths "${F3D_BINDINGS_PYTHON_WINDOWS_BUILD_DLL_FIXUP}" "$") if(BUILD_SHARED_LIBS) list(APPEND f3d_win_dll_paths "$") endif()