sciapp / gr

GR framework: a graphics library for visualisation applications
Other
328 stars 54 forks source link

Fix jpeg search for Gentoo #102

Closed o01eg closed 4 years ago

o01eg commented 4 years ago

Uses search algorithm from Cmake 3.14.6 FindJPEG.cmake module to support different Linux distributives. Works with jpeg-trubo library.

jheinen commented 4 years ago

Thanks for the MR. We will check this (next week) and merge it into the development branch.

FlorianRhiem commented 4 years ago

Thank you for the pull request! The file still searches for jconfig.h and determines the JCONFIG_INCLUDE_DIR, but doesn't access jconfig.h that way, instead searching it with the two new expressions for Fedora and Debian. Maybe I'm missing something, but if jconfig.h is found and the if(JPEG_INCLUDE_DIR AND JCONFIG_INCLUDE_DIR) is executed, why is it necessary to search for jconfig.h again? I suspect that the first search for jconfig.h should be removed as part of this, so that the if only checks for JPEG_INCLUDE_DIR. Then either jpeglib.h contains the major/minor version information, or jconfig.h is found and the version is taken from there.

o01eg commented 4 years ago

@FlorianRhiem In the Gentoo first jconfig.h in JCONFIG_INCLUDE_DIR chooses between ${JCONFIG_INCLUDE_DIR}/i686-pc-linux-gnu/jconfig.h and ${JCONFIG_INCLUDE_DIR}/x86_64-pc-linux-gnu/jconfig.h depending on build target for multi-lib support.

FlorianRhiem commented 4 years ago

And does jconfig.h exist and is found as well on those other systems, but it still needs to be searched in another location instead of using the one that was found?

o01eg commented 4 years ago

Yes, because ${JCONFIG_INCLUDE_DIR}/jconfig.h doesn't contains version info.

FlorianRhiem commented 4 years ago

I have merged this branch into develop. Thank you!