Skip to content

Instantly share code, notes, and snippets.

@bfolkens
Last active September 28, 2018 13:52
Show Gist options
  • Save bfolkens/15a804453efd3cce7e08a75f098d59d8 to your computer and use it in GitHub Desktop.
Save bfolkens/15a804453efd3cce7e08a75f098d59d8 to your computer and use it in GitHub Desktop.
Fix HDF5 library paths for Caffe CMake builds
--- cmake/Dependencies.cmake- 2017-05-28 18:15:46.026060196 +0000
+++ cmake/Dependencies.cmake 2017-05-28 18:16:36.542061070 +0000
@@ -43,9 +43,9 @@
include(cmake/ProtoBuf.cmake)
# ---[ HDF5
-find_package(HDF5 COMPONENTS HL REQUIRED)
-list(APPEND Caffe_INCLUDE_DIRS PUBLIC ${HDF5_INCLUDE_DIRS})
-list(APPEND Caffe_LINKER_LIBS PUBLIC ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES})
+#find_package(HDF5 COMPONENTS HL REQUIRED)
+list(APPEND Caffe_INCLUDE_DIRS PUBLIC "/usr/include/hdf5/serial")
+list(APPEND Caffe_LINKER_LIBS PUBLIC "hdf5_serial_hl" "hdf5_hl_cpp")
# ---[ LMDB
if(USE_LMDB)
@colorlace
Copy link

colorlace commented Jul 11, 2017

My cmake/Dependencies. cmake file is a little different. It looks like...

# ---[ HDF5
find_package(HDF5 COMPONENTS HL REQUIRED)
include_directories(SYSTEM ${HDF5_INCLUDE_DIRS} ${HDF5_HL_INCLUDE_DIR})
list(APPEND Caffe_LINKER_LIBS ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES})

Should this change how I write the new lines for the patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment