summaryrefslogtreecommitdiff
path: root/infra/cmake/packages/Caffe/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'infra/cmake/packages/Caffe/CMakeLists.txt')
-rw-r--r--infra/cmake/packages/Caffe/CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/infra/cmake/packages/Caffe/CMakeLists.txt b/infra/cmake/packages/Caffe/CMakeLists.txt
new file mode 100644
index 000000000..51b723edd
--- /dev/null
+++ b/infra/cmake/packages/Caffe/CMakeLists.txt
@@ -0,0 +1,15 @@
+file(GLOB CORE_SOURCES "${CaffeSource_DIR}/src/caffe/*.cpp" "${CaffeSource_DIR}/src/caffe/util/*.cpp")
+file(GLOB LAYER_SOURCES "${CaffeSource_DIR}/src/caffe/layers/*.cpp")
+
+add_library(caffe SHARED ${CORE_SOURCES} ${LAYER_SOURCES})
+target_compile_definitions(caffe PUBLIC CPU_ONLY)
+target_include_directories(caffe PUBLIC ${CaffeSource_DIR}/include)
+target_include_directories(caffe PRIVATE ${Boost_INCLUDE_DIRS})
+target_include_directories(caffe PRIVATE ${HDF5_INCLUDE_DIRS})
+target_include_directories(caffe PRIVATE ${Atlas_INCLUDE_DIRS})
+target_link_libraries(caffe caffeproto)
+target_link_libraries(caffe glog)
+target_link_libraries(caffe gflags)
+target_link_libraries(caffe ${Boost_LIBRARIES})
+target_link_libraries(caffe ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES})
+target_link_libraries(caffe ${Atlas_LIBRARIES})