Skip to content

Commit

Permalink
ENH: Configure GDCM to use itkOpenJPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
blowekamp committed Dec 7, 2024
1 parent 6cb4ee3 commit ca64d39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Modules/ThirdParty/GDCM/itk-module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ else()
DEPENDS
ITKZLIB
ITKExpat
ITKOpenJPEG
DESCRIPTION
"${DOCUMENTATION}"
)
Expand Down
4 changes: 3 additions & 1 deletion Modules/ThirdParty/GDCM/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ set(GDCM_USE_SYSTEM_EXPAT ON CACHE INTERNAL "")
set(EXPAT_INCLUDE_DIR ${ITKExpat_INCLUDE_DIRS})
set(EXPAT_LIBRARY ${ITKExpat_LIBRARIES})
# OpenJPEG:
set(GDCM_USE_SYSTEM_OPENJPEG OFF CACHE INTERNAL "")
set(GDCM_USE_SYSTEM_OPENJPEG ON CACHE INTERNAL "")
set(GDCM_USE_OPENJPEG_V2 ON CACHE INTERNAL "")
set(OPENJPEG_INCLUDE_DIRS ${ITKOpenJPEG_INCLUDE_DIRS})
set(OPENJPEG_LIBRARIES ${ITKOpenJPEG_LIBRARIES})
# ZLIB:
set(GDCM_USE_SYSTEM_ZLIB ON CACHE INTERNAL "")
set(ZLIB_INCLUDE_DIR ${ITKZLIB_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ else()
endif()

if(GDCM_USE_SYSTEM_OPENJPEG)
find_package(OpenJPEG 2.0.0 REQUIRED)
#find_package(OpenJPEG REQUIRED)
set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES})
else()
set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2)
Expand Down

0 comments on commit ca64d39

Please sign in to comment.