From d6d67c44418d9a12ddeb02787c188168aab662b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Tue, 17 Dec 2024 14:44:42 -0500 Subject: [PATCH] COMP: Fix error in Windows Python CI build This is a follow-up to commit 4cbe24cb4a45d689cadd56d554b8ccf3584a5ca6, PR #5030: https://github.com/InsightSoftwareConsortium/ITK/pull/5030 The error message was: FAILED: Wrapping/Generators/Python/itk/ITKCommon-6.0.dll lib/ITKCommon-6.0.lib C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --msvc-ver=1929 --intdir=Modules\Core\Common\src\CMakeFiles\ITKCommon.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\ITKCommon.rsp /out:Wrapping\Generators\Python\itk\ITKCommon-6.0.dll /implib:lib\ITKCommon-6.0.lib /pdb:Wrapping\Generators\Python\itk\ITKCommon-6.0.pdb /dll /version:1.0 /machine:x64 /INCREMENTAL:NO && cd ." LINK: command "C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\ITKCommon.rsp /out:Wrapping\Generators\Python\itk\ITKCommon-6.0.dll /implib:lib\ITKCommon-6.0.lib /pdb:Wrapping\Generators\Python\itk\ITKCommon-6.0.pdb /dll /version:1.0 /machine:x64 /INCREMENTAL:NO /MANIFEST:EMBED,ID=2" failed (exit code 1104) with the following output: LINK : fatal error LNK1104: cannot open file 'python311.lib' Closes #5075. --- Modules/Core/Common/CMakeLists.txt | 1 + Modules/Core/Common/include/itkPyCommand.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/Core/Common/CMakeLists.txt b/Modules/Core/Common/CMakeLists.txt index b50e0a3c7d4..a694f4a0cf6 100644 --- a/Modules/Core/Common/CMakeLists.txt +++ b/Modules/Core/Common/CMakeLists.txt @@ -133,6 +133,7 @@ configure_file(src/itkConfigurePrivate.h.in itkConfigurePrivate.h) if(ITK_WRAP_PYTHON) set(ITKCommon_SYSTEM_INCLUDE_DIRS "${Python3_INCLUDE_DIRS}") + set(ITKCommon_SYSTEM_LIBRARY_DIRS "${Python3_LIBRARY_DIRS}") endif() set(ITKCommon_INCLUDE_DIRS ${ITKCommon_BINARY_DIR}) set(ITKCommon_LIBRARIES ITKCommon) diff --git a/Modules/Core/Common/include/itkPyCommand.h b/Modules/Core/Common/include/itkPyCommand.h index 7823623f404..5cae0b25665 100644 --- a/Modules/Core/Common/include/itkPyCommand.h +++ b/Modules/Core/Common/include/itkPyCommand.h @@ -39,9 +39,10 @@ namespace itk * * This class was contributed by Charl P. Botha * + * \ingroup ITKSystemObjects * \ingroup ITKCommon */ -class PyCommand : public Command +class ITKCommon_EXPORT PyCommand : public Command { public: ///! Standard "Self" typedef.