CMakeLists.txt 775 B

12345678910111213141516171819202122232425262728293031
  1. set(LIBRARY_NAME zxrabbitmq)
  2. set(LIBRARY_SOURCE_LIST
  3. ${CMAKE_CURRENT_LIST_DIR}/rabbitmq_base.h
  4. ${CMAKE_CURRENT_LIST_DIR}/rabbitmq_base.cpp
  5. ${CMAKE_CURRENT_LIST_DIR}/rabbitmq_message.h
  6. ${CMAKE_CURRENT_LIST_DIR}/rabbitmq_message.cpp
  7. ${CMAKE_CURRENT_LIST_DIR}/rabbitmq.pb.cc
  8. ${CMAKE_CURRENT_LIST_DIR}/rabbitmq.pb.h
  9. )
  10. if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
  11. set(Rabbitmq
  12. /usr/lib/aarch64-linux-gnu/librabbitmq.a
  13. )
  14. else()
  15. set(Rabbitmq
  16. /usr/local/lib/librabbitmq.a
  17. )
  18. endif()
  19. set(LIBRARY_DEPEND_LIST
  20. zxthread
  21. zxmessage
  22. ${Rabbitmq}
  23. ${PROTOBUF_LIBRARIES}
  24. )
  25. add_library(${LIBRARY_NAME} ${LIBRARY_SOURCE_LIST})
  26. target_link_libraries(${LIBRARY_NAME} PUBLIC ${LIBRARY_DEPEND_LIST})