CMakeLists.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. if (NOT BUILD_SHARED_LIBS)
  2. add_definitions(-DAMQP_STATIC)
  3. endif()
  4. include_directories(${LIBRABBITMQ_INCLUDE_DIRS})
  5. if (WIN32)
  6. set(PLATFORM_DIR win32)
  7. else (WIN32)
  8. set(PLATFORM_DIR unix)
  9. endif (WIN32)
  10. set(COMMON_SRCS
  11. utils.h
  12. utils.c
  13. ${PLATFORM_DIR}/platform_utils.c
  14. )
  15. add_executable(amqp_sendstring amqp_sendstring.c ${COMMON_SRCS})
  16. target_link_libraries(amqp_sendstring ${RMQ_LIBRARY_TARGET})
  17. add_executable(amqp_rpc_sendstring_client amqp_rpc_sendstring_client.c ${COMMON_SRCS})
  18. target_link_libraries(amqp_rpc_sendstring_client ${RMQ_LIBRARY_TARGET})
  19. add_executable(amqp_exchange_declare amqp_exchange_declare.c ${COMMON_SRCS})
  20. target_link_libraries(amqp_exchange_declare ${RMQ_LIBRARY_TARGET})
  21. add_executable(amqp_listen amqp_listen.c ${COMMON_SRCS})
  22. target_link_libraries(amqp_listen ${RMQ_LIBRARY_TARGET})
  23. add_executable(amqp_producer amqp_producer.c ${COMMON_SRCS})
  24. target_link_libraries(amqp_producer ${RMQ_LIBRARY_TARGET})
  25. add_executable(amqp_connect_timeout amqp_connect_timeout.c ${COMMON_SRCS})
  26. target_link_libraries(amqp_connect_timeout ${RMQ_LIBRARY_TARGET})
  27. add_executable(amqp_consumer amqp_consumer.c ${COMMON_SRCS})
  28. target_link_libraries(amqp_consumer ${RMQ_LIBRARY_TARGET})
  29. add_executable(amqp_unbind amqp_unbind.c ${COMMON_SRCS})
  30. target_link_libraries(amqp_unbind ${RMQ_LIBRARY_TARGET})
  31. add_executable(amqp_bind amqp_bind.c ${COMMON_SRCS})
  32. target_link_libraries(amqp_bind ${RMQ_LIBRARY_TARGET})
  33. add_executable(amqp_listenq amqp_listenq.c ${COMMON_SRCS})
  34. target_link_libraries(amqp_listenq ${RMQ_LIBRARY_TARGET})
  35. if (ENABLE_SSL_SUPPORT)
  36. add_executable(amqp_ssl_connect amqp_ssl_connect.c ${COMMON_SRCS})
  37. target_link_libraries(amqp_ssl_connect ${RMQ_LIBRARY_TARGET})
  38. endif (ENABLE_SSL_SUPPORT)