diff --git a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt index 6e3504d..1d641c2 100644 --- a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt +++ b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt @@ -375,7 +375,8 @@ else() endif() if(GDCM_USE_SYSTEM_OPENJPEG) - find_package(OpenJPEG 2.0.0 REQUIRED) + # openjpeg version in vcpkg is already greater than 2.0.0 and openjpeg has no version.cmake file + find_package(OpenJPEG REQUIRED) set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES}) else() set(GDCM_OPENJPEG_LIBRARIES itkgdcmopenjp2) diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt index 4ffe98e..a269690 100644 --- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt +++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt @@ -347,12 +347,8 @@ endif() #----------------------------------------------------------------------------- # pkgconfig support -# enabled by default on Unix, disabled by default on other platforms -if(UNIX) - option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON) -else() - option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF) -endif() +# Cannot use the built-in openjp2 because the configuration path is under buildtrees +option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF) if(BUILD_PKGCONFIG_FILES) # install in lib and not share (see multi-arch note above) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in