CMakeLists.txt 546 B

1234567891011121314151617181920212223242526
  1. cmake_minimum_required(VERSION 3.6)
  2. project(message)
  3. include_directories(${CMAKE_CURRENT_BINARY_DIR})
  4. set(PROTO_LIST rpc_meta.proto rpc_meta_brpc.proto rpc_meta_trpc.proto)
  5. protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
  6. set(SRC
  7. rpc_message_brpc.cc
  8. rpc_message_srpc.cc
  9. rpc_message_thrift.cc
  10. rpc_message_trpc.cc
  11. ${PROTO_SRCS} ${PROTO_HDRS}
  12. )
  13. add_library(${PROJECT_NAME} OBJECT ${SRC})
  14. if (WIN32)
  15. target_compile_definitions(
  16. ${PROJECT_NAME} PRIVATE
  17. strdup=_strdup
  18. strcasecmp=_stricmp
  19. strncasecmp=_strnicmp
  20. )
  21. endif ()