From 12514b11638793410c840c888eddb08d72318906 Mon Sep 17 00:00:00 2001 From: Curtis Doty Date: Sun, 25 Aug 2024 21:56:48 +0000 Subject: [PATCH] Show proper error when lcms2 is missing --- frmts/pdf/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frmts/pdf/CMakeLists.txt b/frmts/pdf/CMakeLists.txt index 048cb0592e1c..3eb90eef92e3 100644 --- a/frmts/pdf/CMakeLists.txt +++ b/frmts/pdf/CMakeLists.txt @@ -79,7 +79,10 @@ if (GDAL_USE_PDFIUM) find_package(JPEG REQUIRED) find_package(PNG REQUIRED) find_package(OpenJPEG REQUIRED) - find_library(LCMS2_LIBRARY NAMES lcms2 REQUIRED) + find_library(LCMS2_LIBRARY NAMES lcms2) + if(NOT LCMS2_LIBRARY) + message(FATAL_ERROR "LCMS2 library not found. Please install liblcms2-dev.") + endif() # Rather hacky... Related how we build pdfium in https://github.com/rouault/pdfium_build_gdal_3_4 gdal_target_link_libraries(