Commit 2a637461 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #827 from alalek:hdf5_warn

parents c47b0ea2 213e0bb3
...@@ -16,24 +16,21 @@ if(WIN32) ...@@ -16,24 +16,21 @@ if(WIN32)
set(HDF5_FOUND "NO") set(HDF5_FOUND "NO")
endif() endif()
else() else()
if(NOT CMAKE_CROSSCOMPILING) # iOS build should not reuse OSX package
find_package(HDF5) find_package(HDF5)
endif()
endif() endif()
if(HDF5_FOUND) if(NOT HDF5_FOUND)
set(HAVE_HDF5 1) ocv_module_disable(hdf) # no return
message(STATUS "HDF5: YES")
else()
ocv_module_disable(hdf)
message(STATUS "HDF5: NO")
endif() endif()
set(HAVE_HDF5 1)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Winvalid-offsetof)
set(the_description "Hierarchical Data Format I/O") set(the_description "Hierarchical Data Format I/O")
ocv_define_module(hdf opencv_core WRAP python) ocv_define_module(hdf opencv_core WRAP python)
if(HDF5_FOUND) include_directories(${HDF5_INCLUDE_DIRS})
include_directories(${HDF5_INCLUDE_DIRS}) target_link_libraries(opencv_hdf ${HDF5_LIBRARIES})
endif()
if(HDF5_FOUND)
target_link_libraries(opencv_hdf ${HDF5_LIBRARIES})
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment