Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.