forked from Tencent/ncnn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix windows build fails (Tencent#321)
* fix windows build error * remove wrong commit
- Loading branch information
Showing
4 changed files
with
32 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
|
||
find_package(Protobuf REQUIRED) | ||
|
||
include_directories(${PROTOBUF_INCLUDE_DIR}) | ||
if(PROTOBUF_FOUND) | ||
include_directories(${PROTOBUF_INCLUDE_DIR}) | ||
include_directories(${CMAKE_CURRENT_BINARY_DIR}) | ||
protobuf_generate_cpp(CAFFE_PROTO_SRCS CAFFE_PROTO_HDRS caffe.proto) | ||
add_executable(caffe2ncnn caffe2ncnn.cpp ${CAFFE_PROTO_SRCS} ${CAFFE_PROTO_HDRS}) | ||
target_link_libraries(caffe2ncnn ${PROTOBUF_LIBRARIES}) | ||
else() | ||
MESSAGE(WARNING "Protobuf not found, caffe model convert tools won't build") | ||
endif() | ||
|
||
include_directories(${CMAKE_CURRENT_BINARY_DIR}) | ||
protobuf_generate_cpp(CAFFE_PROTO_SRCS CAFFE_PROTO_HDRS caffe.proto) | ||
|
||
add_executable(caffe2ncnn caffe2ncnn.cpp ${CAFFE_PROTO_SRCS} ${CAFFE_PROTO_HDRS}) | ||
|
||
target_link_libraries(caffe2ncnn ${PROTOBUF_LIBRARIES}) |