Skip to content

COMP: Fix IPOPT packaging in Windows - #329

Open
xskere wants to merge 1 commit into
SlicerRt:masterfrom
xskere:fix-ipopt-packaging
Open

COMP: Fix IPOPT packaging in Windows#329
xskere wants to merge 1 commit into
SlicerRt:masterfrom
xskere:fix-ipopt-packaging

Conversation

@xskere

@xskere xskere commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

CPACK_INSTALL_CMAKE_PROJECTS requires every listed directory to be a CMake build tree with a generated cmake_install.cmake. The Mumps/HSL/Ipopt entries pointed at autotools install prefixes (Unix) or a prebuilt binaries zip extraction (Windows), none of which are CMake projects, so package failed with a generic "Error when generating package: SlicerRT" whenever EXTENSION_BUILDS_IPOPT=ON.

Removed those three entries from CPACK_INSTALL_CMAKE_PROJECTS in the top-level CMakeLists.txt.
Added a proper install() rule in ExternalBeamPlanning/Widgets/CMakeLists.txt so the IPOPT DLLs are installed as part of that module (which is a real CMake target with a valid install script) instead.

With this fix, both build and package work on Windows and Linux.

Re #298

)
endforeach()

# Also install the DLLs for packaging. Ipopt is a prebuilt zip on Windows (not a CMake

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we put this in an if (WIN32)? Not sure if this would break the packaging on Linux

@xskere xskere Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's inside if(EXTENSION_BUILDS_IPOPT AND WIN32 AND DEFINED Ipopt_DLL_DIR) so it should be already covered on that. Also I tested build + packaging on both Windows and Linux and it worked fine for both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants