From a196d4403df91bdc7803a37ca46bb933c2501457 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Fri, 7 Aug 2026 11:08:38 -0400 Subject: [PATCH] Check JPEG_FOUND before finding the JPEG package. Check for JPEG_FOUND before calling find_package(JPEG). This allows a project which depends libturbo-jpeg already via add_subdirectory() to share that implementation with libultrahdr. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69a249b5..9f858901 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -423,7 +423,7 @@ if(UHDR_ENABLE_GLES) endif() # libjpeg-turbo -if(NOT UHDR_BUILD_DEPS) +if(NOT UHDR_BUILD_DEPS AND NOT JPEG_FOUND) find_package(JPEG QUIET) if(NOT JPEG_FOUND) message(FATAL_ERROR "Could NOT find JPEG (missing: JPEG_LIBRARIES JPEG_INCLUDE_DIRS),\