summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2017-05-15 03:33:46 (GMT)
committerGitHub <noreply@github.com>2017-05-15 03:33:46 (GMT)
commit91b09280f5233cafc62954c98ce8bc4c204e7475 (patch)
treed3a7e526784745662dd19ca14eea8b235a637012
parent27ffbbf220de3b1d8ee68160876daa86511a7207 (diff)
parent30a2ab7e50430911f37ddf981e67e4f36f662f14 (diff)
downloadcaffe-91b09280f5233cafc62954c98ce8bc4c204e7475.zip
caffe-91b09280f5233cafc62954c98ce8bc4c204e7475.tar.gz
caffe-91b09280f5233cafc62954c98ce8bc4c204e7475.tar.bz2
Merge pull request #5624 from CDLuminate/cmake-rename-static-proto-library
cmake: rename libproto.a -> libcaffeproto.a
-rw-r--r--cmake/ConfigGen.cmake2
-rw-r--r--src/caffe/CMakeLists.txt12
2 files changed, 7 insertions, 7 deletions
diff --git a/cmake/ConfigGen.cmake b/cmake/ConfigGen.cmake
index ad91f54..09bb09b 100644
--- a/cmake/ConfigGen.cmake
+++ b/cmake/ConfigGen.cmake
@@ -33,7 +33,7 @@ function(caffe_generate_export_configs)
configure_file("cmake/Templates/CaffeConfig.cmake.in" "${PROJECT_BINARY_DIR}/CaffeConfig.cmake" @ONLY)
# Add targets to the build-tree export set
- export(TARGETS caffe proto FILE "${PROJECT_BINARY_DIR}/CaffeTargets.cmake")
+ export(TARGETS caffe caffeproto FILE "${PROJECT_BINARY_DIR}/CaffeTargets.cmake")
export(PACKAGE Caffe)
# ---[ Configure install-tree CaffeConfig.cmake file ]---
diff --git a/src/caffe/CMakeLists.txt b/src/caffe/CMakeLists.txt
index b9152e9..4a80556 100644
--- a/src/caffe/CMakeLists.txt
+++ b/src/caffe/CMakeLists.txt
@@ -3,12 +3,12 @@ file(GLOB proto_files proto/*.proto)
caffe_protobuf_generate_cpp_py(${proto_gen_folder} proto_srcs proto_hdrs proto_python ${proto_files})
# include python files either to force generation
-add_library(proto STATIC ${proto_hdrs} ${proto_srcs} ${proto_python})
-caffe_default_properties(proto)
-target_link_libraries(proto PUBLIC ${PROTOBUF_LIBRARIES})
-target_include_directories(proto PUBLIC ${PROTOBUF_INCLUDE_DIR})
+add_library(caffeproto STATIC ${proto_hdrs} ${proto_srcs} ${proto_python})
+caffe_default_properties(caffeproto)
+target_link_libraries(caffeproto PUBLIC ${PROTOBUF_LIBRARIES})
+target_include_directories(caffeproto PUBLIC ${PROTOBUF_INCLUDE_DIR})
-list(INSERT Caffe_LINKER_LIBS 0 PUBLIC proto) # note, crucial to prepend!
+list(INSERT Caffe_LINKER_LIBS 0 PUBLIC caffeproto) # note, crucial to prepend!
# --[ Caffe library
@@ -42,7 +42,7 @@ set_target_properties(caffe PROPERTIES
# ---[ Install
install(DIRECTORY ${Caffe_INCLUDE_DIR}/caffe DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES ${proto_hdrs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/caffe/proto)
-install(TARGETS caffe proto EXPORT CaffeTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(TARGETS caffe caffeproto EXPORT CaffeTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
file(WRITE ${PROJECT_BINARY_DIR}/__init__.py)
list(APPEND proto_python ${PROJECT_BINARY_DIR}/__init__.py)