-
Notifications
You must be signed in to change notification settings - Fork 5.8k
HDF: Fix MSVC build. (Issues #546, #497, #552). #547
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
Conversation
cbalint13
commented
Feb 12, 2016
- This patch fixes hdf5 build for MSVC: Cannot build hdf modules on windows #546
- At the PR time the msvc buildbot lacked hdf5 lib thus build verification was not possible.
@mshabunin , @vpisarev , @alalek Could please help me with the buildbots, seems that on several hdf5-lib is missing:
Thanks ! |
Almost all 3rdparty dependencies are optional:
|
But this doesn't work due some unexpected failures. |
@alalek , For 1,2,3,4 understood the points, there is no problem. However this PR still can be merged for MSVC users. New issue, would require your help:
It appears that on VS2015 CMake's internal FindHDF.cmake module see the header files (H5version.h) since its able to detect the version but not the library itself (probably cannot find the path).
|
@cbalint13 I installed HDF5 on Windows slave as requested, errors(warnings) are coming from this change. |
@cbalint13 Could you replace
|
@alalek ,
|
Lets see. |
There are problems with such statement:
This looks fine: |
@cbalint13 Please note: I follow an official guide of HDF5 library and use It is not easy to pass
Also it can't be passed via You can try to play with it (insert before find package):
Also this approach works on Linux:
Anyway I believe this switch helps in all other cases:
|
@alalek ,
Be back, |
@alalek ,
|
Done: hdf5_setup.txt |
@alalek ,
|
@alalek , Lets have HDF5_DIR in final, don't remove:
I'll wait until it builds fine. |
@alalek , By hereby patch I propose a simple fix for MSVC land. Few thoughts over HDF5 & CMake especially on MSVC:
All three statements are valid even for older hdf5 binary release as all my tests concluded. My final conclusion is to handle with separate simple & maintainable routines via env{HDF5_DIRS} just like actual patch does. Or perhaps even accounting the PATH environment that is always settled by .msi installers. Actual patch can be extended with ease to handle more HINTS if will be necessary at any time. Let me know if would like to add to HINT the +env{PATH} too (a bit regexped and filtered). Perhaps it is a good idea to have booth HDF5_DIR and PATH lookup. |
👍 |
Back ported upstream OpenCV changes to fix build errors in Visual Studio relating to the use of HDF5. See upstream changes here: opencv/opencv_contrib#547