Skip to content

Commit

Permalink
Added documentation for cmake files
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamMalu committed Jun 29, 2017
1 parent 591822a commit eac84d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 8 additions & 6 deletions cmake/modules/FindCaffe.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Caffe package
unset(Caffe_FOUND)

###Set the variable Caffe_DISTRIBUTE_DIR as the root of your caffe directory
#set(Caffe_DISTRIBUTE_DIR "/home/gautam/gsoc/caffe/distribute")
###############################################################################
# Find Caffe
#
# This sets the following variables:
# Caffe_FOUND - True if Eigen was found.
# Caffe_INCLUDE_DIRS - Directories containing the Eigen include files.
# Caffe_LIBRARIES - Caffe library location.

unset(Caffe_FOUND)

find_path(Caffe_INCLUDE_DIRS NAMES caffe/caffe.hpp caffe/common.hpp caffe/net.hpp caffe/proto/caffe.pb.h caffe/util/io.hpp caffe/vision_layers.hpp
HINTS
${Caffe_DISTRIBUTE_DIR}/include)



find_library(Caffe_LIBRARIES NAMES caffe
HINTS
${Caffe_DISTRIBUTE_DIR}/lib)
Expand Down
6 changes: 4 additions & 2 deletions cmake/od_mandatory_dependency.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ find_package(OpenCV REQUIRED)
find_package(VTK REQUIRED)
find_package(Eigen REQUIRED)
find_package(Boost 1.40 COMPONENTS program_options REQUIRED )

#setting caffe distribute dir
# TODO: add caffe requirement in the documentation
set(Caffe_DISTRIBUTE_DIR "/home/gautam/gsoc/caffe/distribute")
find_package(Caffe REQUIRED)
# Glog is required for caffe_xor, and mnist_train examples
find_package(Glog REQUIRED)
ADD_DEFINITIONS(
-std=c++11
${Caffe_DEFINITIONS}
)

#add caffe include dirs
include_directories("${OD_SOURCE_DIR}" ${EIGEN_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS} ${OD_SOURCE_DIR}/3rdparty/SiftGPU/src/SiftGPU ${Caffe_INCLUDE_DIRS} )


Expand Down

0 comments on commit eac84d7

Please sign in to comment.