CMakeLists.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 2007 - 2021, Alan Antonuk and the rabbitmq-c contributors.
  2. # SPDX-License-Identifier: mit
  3. add_library(examples-common OBJECT)
  4. target_sources(examples-common PRIVATE
  5. utils.h
  6. utils.c)
  7. if(WIN32)
  8. target_sources(examples-common PRIVATE win32/platform_utils.c)
  9. else()
  10. target_sources(examples-common PRIVATE unix/platform_utils.c)
  11. endif()
  12. target_link_libraries(examples-common PRIVATE rabbitmq::rabbitmq)
  13. add_executable(amqp_sendstring amqp_sendstring.c)
  14. target_link_libraries(amqp_sendstring PRIVATE examples-common rabbitmq::rabbitmq)
  15. add_executable(amqp_rpc_sendstring_client amqp_rpc_sendstring_client.c)
  16. target_link_libraries(amqp_rpc_sendstring_client PRIVATE examples-common rabbitmq::rabbitmq)
  17. add_executable(amqp_exchange_declare amqp_exchange_declare.c)
  18. target_link_libraries(amqp_exchange_declare PRIVATE examples-common rabbitmq::rabbitmq)
  19. add_executable(amqp_listen amqp_listen.c)
  20. target_link_libraries(amqp_listen PRIVATE examples-common rabbitmq::rabbitmq)
  21. add_executable(amqp_producer amqp_producer.c)
  22. target_link_libraries(amqp_producer PRIVATE examples-common rabbitmq::rabbitmq)
  23. add_executable(amqp_connect_timeout amqp_connect_timeout.c)
  24. target_link_libraries(amqp_connect_timeout PRIVATE examples-common rabbitmq::rabbitmq)
  25. add_executable(amqp_consumer amqp_consumer.c)
  26. target_link_libraries(amqp_consumer PRIVATE examples-common rabbitmq::rabbitmq)
  27. add_executable(amqp_unbind amqp_unbind.c)
  28. target_link_libraries(amqp_unbind PRIVATE examples-common rabbitmq::rabbitmq)
  29. add_executable(amqp_bind amqp_bind.c)
  30. target_link_libraries(amqp_bind PRIVATE examples-common rabbitmq::rabbitmq)
  31. add_executable(amqp_listenq amqp_listenq.c)
  32. target_link_libraries(amqp_listenq PRIVATE examples-common rabbitmq::rabbitmq)
  33. if (ENABLE_SSL_SUPPORT)
  34. add_executable(amqp_ssl_connect amqp_ssl_connect.c)
  35. target_link_libraries(amqp_ssl_connect PRIVATE examples-common rabbitmq::rabbitmq)
  36. endif (ENABLE_SSL_SUPPORT)