Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FindOpenEXR.cmake to use version detected by pkg-config, if available #2057

Merged

Conversation

devurandom
Copy link
Contributor

@devurandom devurandom commented Nov 9, 2018

Detecting the OpenEXR version by parsing a C header can be unreliable. Since
we already use pkg-config to detect the presence of the library, we can also
use the version number it gives us, if available, and only resort to parsing
the header file if that failed.

See-Also: https://bugs.gentoo.org/668412
Fixes: ec4f679

Description

See commit message. I suggest to backport this to branch RB-1.8.

Tests

I applied this patch to release 1.8.16 and successfully compiled a Gentoo package with it.

Checklist:

  • I have read the contribution guidelines.
  • If this is more extensive than a small change to existing code, I
    have previously submitted a Contributor License Agreement
    (individual, and if there is any way my
    employers might think my programming belongs to them, then also
    corporate).
    • N/A
  • I have updated the documentation, if applicable.
    • N/A
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
    • N/A
  • My code follows the prevailing code style of this project.

…able

Detecting the OpenEXR version by parsing a C header can be unreliable.  Since
 we already use pkg-config to detect the presence of the library, we can also
 use the version number it gives us, if available, and only resort to parsing
 the header file if that failed.

See-Also: https://bugs.gentoo.org/668412
Fixes: ec4f679
@devurandom devurandom changed the title WIP: Fix FindOpenEXR.cmake to use version detected by pkg-config, if available Fix FindOpenEXR.cmake to use version detected by pkg-config, if available Nov 9, 2018
@lgritz
Copy link
Collaborator

lgritz commented Nov 9, 2018

Looking good this time!

@lgritz lgritz merged commit 8e9e68a into AcademySoftwareFoundation:master Nov 10, 2018
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Nov 10, 2018
…able (AcademySoftwareFoundation#2057)

Detecting the OpenEXR version by parsing a C header can be unreliable.  Since
 we already use pkg-config to detect the presence of the library, we can also
 use the version number it gives us, if available, and only resort to parsing
 the header file if that failed.

See-Also: https://bugs.gentoo.org/668412
Fixes: ec4f679
@lgritz
Copy link
Collaborator

lgritz commented Nov 10, 2018

Backported to 1.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants