Skip to content

Commit cfbd57a

Browse files
committed
mod demo cmake
1 parent 99341f7 commit cfbd57a

File tree

2 files changed

+5
-157
lines changed

2 files changed

+5
-157
lines changed

CMakeListsBak.txt

Lines changed: 0 additions & 150 deletions
This file was deleted.

demo/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ if(UNIX) # Darwing or Linux
2121
message(TIGERAPI_INCLUDE_DIR " ${TIGERAPI_INCLUDE_DIR}")
2222
find_library(TIGERAPI_LIBRARY NAMES libtigerapi.a)
2323

24+
# 可使用系统库或sdk output中的库
2425
set(Protobuf_INCLUDE_DIR "/usr/local/opt/protobuf/include")
2526
set(Protobuf_LIBRARY "/usr/local/opt/protobuf/lib/libprotobuf.dylib")
26-
set(Protobuf_PROTOC_LIBRARY "/usr/local/opt/protobuf/lib/libprotoc.dylib")
27-
set(Protobuf_PROTOC_EXECUTABLE "/usr/local/opt/protobuf/bin/protoc")
28-
29-
# 查找 Protobuf 包
30-
find_package(Protobuf REQUIRED)
27+
# find_path(Protobuf_INCLUDE_DIR NAMES google/protobuf/service.h)
28+
# find_library(Protobuf_LIBRARY NAMES protobuf)
3129
message(STATUS "Protobuf version: ${Protobuf_VERSION}")
3230
message(STATUS "Protobuf include dir: ${Protobuf_INCLUDE_DIR}")
3331
message(STATUS "Protobuf libraries: ${Protobuf_LIBRARY}")
@@ -78,10 +76,10 @@ set(HEADER_SEARCH_PATHS ${CPPREST_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${OPENSSL_IN
7876
if(APPLE)
7977
set(OPENSSL_LIBS "${OPENSSL_LIBRARIES}")
8078
# set(ZIP_LIBRARY "/usr/local/Cellar/zlib/1.2.12/lib/libz.dylib")
81-
set(LIBRARIES_SEARCH_PATHS ${OPENSSL_LIBS} ${Boost_LIBRARIES} ${ZIP_LIBRARY} ${CPPREST_LIBRARY} ${TIGERAPI_LIBRARY} ${Protobuf_LIBRARY} ${Protobuf_PROTOC_LIBRARY})
79+
set(LIBRARIES_SEARCH_PATHS ${OPENSSL_LIBS} ${Boost_LIBRARIES} ${ZIP_LIBRARY} ${CPPREST_LIBRARY} ${TIGERAPI_LIBRARY} ${Protobuf_LIBRARY} )
8280
else()
8381
set(OPENSSL_LIBS "${OPENSSL_LIBRARIES}")
84-
set(LIBRARIES_SEARCH_PATHS ${OPENSSL_LIBS} ${Boost_LIBRARIES} ${ZIP_LIBRARY} ${CPPREST_LIBRARY} ${TIGERAPI_LIBRARY} ${Protobuf_LIBRARY} ${Protobuf_PROTOC_LIBRARY})
82+
set(LIBRARIES_SEARCH_PATHS ${OPENSSL_LIBS} ${Boost_LIBRARIES} ${ZIP_LIBRARY} ${CPPREST_LIBRARY} ${TIGERAPI_LIBRARY} ${Protobuf_LIBRARY} )
8583
endif()
8684

8785
message(LIBRARIES_SEARCH_PATHS " ${LIBRARIES_SEARCH_PATHS}")

0 commit comments

Comments
 (0)