Bug 103593

Summary: [PATCH] CMake: make FindLCMS.cmake cross-aware
Product: poppler Reporter: Roland Hieber <r.hieber>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: CMake: make FindLCMS.cmake cross-compatible

Description Roland Hieber 2017-11-06 16:42:32 UTC
Created attachment 135262 [details] [review]
CMake: make FindLCMS.cmake cross-compatible

Hi,

FindLCMS.make currently complains when being run in cross-compile mode:

  -- Checking for module 'lcms'
  --   Found lcms, version 1.19
  CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the
  following cache variables appropriately:
     LCMS_VERSION (advanced)
     LCMS_VERSION__TRYRUN_OUTPUT (advanced)
  For details see [...]/poppler-0.60.1-build/TryRunResults.cmake
  -- Found lcms version P.LE, [...]/sysroot-target/usr/lib/liblcms.so

I don't know why it complains if it obviously detected the correct version :), but here is a patch that replaces `try_run(..)` with the version parsing regex from FindLCMS2.make which only needs to read the header file.

(Yes, I'm still building with the old lcms1... some embedded systems seem to run forever.)
Comment 1 Albert Astals Cid 2017-11-09 08:42:38 UTC
Sorry but i'm not going to accept this patch, we're dropping lcms1 support next month as discussed on the mailing list, so there's really no reason to tweak it's cmake file at this stage.
Comment 2 Roland Hieber 2017-11-09 10:53:45 UTC
OK, I was about to suggest the same, so I have a reason to upgrade to lcms2 :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.