Skip to content

Commit 30a2ab7

Browse files
committed
cmake: rename libproto.a -> libcaffeproto.a
1 parent 25391bf commit 30a2ab7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cmake/ConfigGen.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function(caffe_generate_export_configs)
3333
configure_file("cmake/Templates/CaffeConfig.cmake.in" "${PROJECT_BINARY_DIR}/CaffeConfig.cmake" @ONLY)
3434

3535
# Add targets to the build-tree export set
36-
export(TARGETS caffe proto FILE "${PROJECT_BINARY_DIR}/CaffeTargets.cmake")
36+
export(TARGETS caffe caffeproto FILE "${PROJECT_BINARY_DIR}/CaffeTargets.cmake")
3737
export(PACKAGE Caffe)
3838

3939
# ---[ Configure install-tree CaffeConfig.cmake file ]---

src/caffe/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ file(GLOB proto_files proto/*.proto)
33
caffe_protobuf_generate_cpp_py(${proto_gen_folder} proto_srcs proto_hdrs proto_python ${proto_files})
44

55
# include python files either to force generation
6-
add_library(proto STATIC ${proto_hdrs} ${proto_srcs} ${proto_python})
7-
caffe_default_properties(proto)
8-
target_link_libraries(proto PUBLIC ${PROTOBUF_LIBRARIES})
9-
target_include_directories(proto PUBLIC ${PROTOBUF_INCLUDE_DIR})
6+
add_library(caffeproto STATIC ${proto_hdrs} ${proto_srcs} ${proto_python})
7+
caffe_default_properties(caffeproto)
8+
target_link_libraries(caffeproto PUBLIC ${PROTOBUF_LIBRARIES})
9+
target_include_directories(caffeproto PUBLIC ${PROTOBUF_INCLUDE_DIR})
1010

11-
list(INSERT Caffe_LINKER_LIBS 0 PUBLIC proto) # note, crucial to prepend!
11+
list(INSERT Caffe_LINKER_LIBS 0 PUBLIC caffeproto) # note, crucial to prepend!
1212

1313
# --[ Caffe library
1414

@@ -42,7 +42,7 @@ set_target_properties(caffe PROPERTIES
4242
# ---[ Install
4343
install(DIRECTORY ${Caffe_INCLUDE_DIR}/caffe DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
4444
install(FILES ${proto_hdrs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/caffe/proto)
45-
install(TARGETS caffe proto EXPORT CaffeTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
45+
install(TARGETS caffe caffeproto EXPORT CaffeTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
4646

4747
file(WRITE ${PROJECT_BINARY_DIR}/__init__.py)
4848
list(APPEND proto_python ${PROJECT_BINARY_DIR}/__init__.py)

0 commit comments

Comments
 (0)