fix FindOpenEXR to respect OPENEXR_ROOT#15159
Conversation
alalek
left a comment
There was a problem hiding this comment.
Extra validation checks are required:
- base directory for includes/libraries/etc should be "the same". Case with libraries from
/usr/liband includes from/opt/local/includeis wrong (due missing system's "-dev" package). - the same note is about suffixes like
_s_d. All libraries should have the same build configuration.
Perhaps it make sense to wrap searching code into macro and call it multiple times with different paths / suffixes.
|
@alalek I've changed the logic according to your suggestions |
bfdaccd to
0338e80
Compare
|
@SSE4 I tried the solution for Ubuntu 16.04 and it does not work for me. Please correct me, if I do something wrong: Console log for OpenCV: CMakeCache.txt content: |
|
@asmorkalov steps appear to be correct. I'll take a look and let you know. |
|
@asmorkalov worked for me ( |
|
@SSE4 I apologize for the delay. I tried the patch with Ubuntu 16.04 and 18.04. It works properly on 18.04, but not on 16.04. Most probably it's issue of CMake 3.5.1. I'll dig a little bit in this today and let you know. |
|
@asmorkalov no problem. I'll try on 16.04 as well (and older CMake) and let you know about my findings, if it's related to Ubuntu version or CMake version. |
|
@SSE4, do you have any progress on this? |
|
@asmorkalov on Ubuntu 16.04 I get: while building OpenEXR |
|
@asmorkalov results: |
|
@SSE4 I apologize that I misdirect you with CMake versions. I have several versions on my host and I used 3.10+ for both OpenEXR and OpenCV as the first one cannot be built with old CMake. Let me describe what happened on my host and how to fix it.
I see two things to fix:
|
|
@asmorkalov okay, I'll do that adjustments. meanwhile, do you have a command line to reproduce and test the explained case (to get some incomplete OpenEXR installation)? |
|
@SSE4 I just tried to install everything related to OpenEXR on my Ubuntu 16.04. I'm not sure if it's complete installation or not, but it was not properly recognized by your code -- only headers were found. |
0338e80 to
210da18
Compare
|
@asmorkalov I've made suggested adjustments |
alalek
left a comment
There was a problem hiding this comment.
This patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly).
So, please:
- change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
- rebase your commits from master onto 3.4 branch. For example:
git rebase -i --onto upstream/3.4 upstream/master
(check list of your commits, save and quit (Esc + "wq" + Enter)
whereupstreamis configured by following this GitHub guide and fetched (git fetch upstream). - push rebased commits into source branch of your fork (with
--forceoption)
Note: no needs to re-open PR, apply changes "inplace".
Signed-off-by: SSE4 <tomskside@gmail.com>
210da18 to
2e20f06
Compare
|
@alalek rebased onto 3.4 |
resolves #13403
This pullrequest changes
OPENEXR_ROOTis set, it has the top priority, so user-supplied OpenEXR version always wins against system-provided or one provided by OpenCV itselfOPENEXR_ROOTto hard-coded paths (like C:\deploy)Halflibrary may have the following names in OpenEXR 2.3:Half-2_3 Half-2_3_s Half-2_3_d Half-2_3_s_d Half Half_s Half_d Half_s_dOpenEXRConfig.hto find OpenEXR version number in order to know versioned library nameschanges above basically allow to find OpenEXR supplied by various package managers (e.g. conan, vcpkg, hunter, cget, cppan, brew, etc.)