Skip to content

Commit a3a8fef

Browse files
committed
COMP: Force runtime output with Visual Studio and Python wrapping
To use WrapITK.pth with a build tree, the .pyd files must be deposited with the rest of the Python runtime tree. Force the runtime output directory location. If initial configuration with the CMake GUI does not have ITK_WRAP_PYTHON enabled, the correct value is not set. Closes #2252
1 parent e2c7105 commit a3a8fef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ if(ITK_WRAPPING)
297297
# When wrapping, the multi-config generators can only be used in degraded state
298298
# of allowing only a single element int the CMAKE_CONFIGURATION_TYPES and enforcing
299299
# that CMAKE_BUILD_TYPE match that type (see Wrapping/CMakeLists.txt enforcement)
300-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "$<1:${ITK_PYTHON_PACKAGE_DIR}>" CACHE PATH "Shared library directory with generator override")
301-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "$<1:${ITK_PYTHON_PACKAGE_DIR}>" CACHE PATH "Shared library directory with generator override")
300+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "$<1:${ITK_PYTHON_PACKAGE_DIR}>" CACHE PATH "Shared library directory with generator override" FORCE)
301+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "$<1:${ITK_PYTHON_PACKAGE_DIR}>" CACHE PATH "Shared library directory with generator override" FORCE)
302302
endif()
303303
else()
304304
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${NO_WRAP_CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE PATH "Shared library directory")

0 commit comments

Comments
 (0)