Skip to content
Draft
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
9 changes: 8 additions & 1 deletion Modules/ThirdParty/GDCM/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ set(OPENJPEG_INCLUDE_DIRS "")
set(OPENJPEG_LIBRARIES "ITK::ITKOpenJPEGModule")
# ZLIB:
set(GDCM_USE_SYSTEM_ZLIB ON CACHE INTERNAL "")
set(ZLIB_INCLUDE_DIRS "")
if(ITK_USE_SYSTEM_ZLIB)
# ZLIB_INCLUDE_DIR is populated by find_package(ZLIB) in ITK's ZLIB module.
# Pass it explicitly so GDCM's root CMakeLists can find the real system <zlib.h>

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.

These statements are verbose and misleading.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Is the suggested course of actions to reduce/remove comments, or to abandon the PR? I was trying to build Slicer from this commit: dzenanz/Slicer@d177327

@blowekamp blowekamp Jul 8, 2026

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.

It looks like that branch is based on a couple months ago version of ITK. There have been several fixes for using system libraries in just the past couple of weeks that should be included. So this issue may already be fixed in ITK main?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Main from 2 days ago is merged there. Nothing related to GDCM got merged since.

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.

I tried to reproduce the error. I checkout dzenanz/Slicer@d177327 and was successfully able to built the ITK target on a clean build. So I wasn't able to reproduce to look at this further.

@blowekamp blowekamp Jul 8, 2026

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.

I was able to build your slicer branch with your ITK 7ed87c5 (before this change) and was not able to reproduce the issue either. This is on a linux system while above it is reported as a windows system.

I wonder if this reported issue is related to the multi-build (release/debug) VS system.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let me try building that on Linux.

set(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
else()
# ITK's bundled zlib is provided through the target's INTERFACE_INCLUDE_DIRECTORIES
set(ZLIB_INCLUDE_DIRS "")
Comment thread
dzenanz marked this conversation as resolved.
endif()
set(ZLIB_LIBRARIES "ITK::ITKZLIBModule")

# Configure GDCM privately so its options do not appear to the user.
Expand Down
Loading