mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 19:11:38 +08:00
14 lines
730 B
Diff
14 lines
730 B
Diff
diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake
|
|
index 9568ef043e..94617e3ac9 100644
|
|
--- a/cmake/helpers/CheckDependentLibraries.cmake
|
|
+++ b/cmake/helpers/CheckDependentLibraries.cmake
|
|
@@ -416,7 +416,7 @@ if (GDAL_USE_JPEG AND (JPEG_LIBRARY MATCHES ".*turbojpeg\.(so|lib)"))
|
|
"JPEG_LIBRARY should point to a library with libjpeg ABI, not TurboJPEG. See https://libjpeg-turbo.org/About/TurboJPEG for the difference"
|
|
)
|
|
endif ()
|
|
-if (TARGET JPEG::JPEG)
|
|
+if (GDAL_USE_JPEG AND TARGET JPEG::JPEG)
|
|
set(EXPECTED_JPEG_LIB_VERSION "" CACHE STRING "Expected libjpeg version number")
|
|
mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES)
|
|
if (EXPECTED_JPEG_LIB_VERSION)
|