2019-06-15 06:04:58 +08:00
|
|
|
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
|
|
|
|
index 6ac16ab6..2bde9952 100644
|
|
|
|
--- a/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
|
|
|
|
+++ b/Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt
|
|
|
|
@@ -373,7 +373,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 gdcmopenjp2)
|
|
|
|
diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt
|
|
|
|
index 565cc338..ec126ef9 100644
|
|
|
|
--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt
|
|
|
|
+++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt
|
|
|
|
@@ -359,12 +359,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
|