Skip to content

Commit 41e7c93

Browse files
committed
Building the rest of the example programs
1 parent 475dfaf commit 41e7c93

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

examples/CMakeLists.txt

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
11
include_directories(${librabbitmq_SOURCE_DIR} ${librabbitmq_BINARY_DIR})
22

3-
add_executable(amqp_sendstring amqp_sendstring.c utils.h utils.c)
3+
if (WIN32)
4+
set(PLATFORM_DIR win32)
5+
else (WIN32)
6+
set(PLATFORM_DIR unix)
7+
endif (WIN32)
8+
9+
set(COMMON_SRCS
10+
utils.h
11+
utils.c
12+
${PLATFORM_DIR}/platform_utils.c
13+
)
14+
15+
add_executable(amqp_sendstring amqp_sendstring.c ${COMMON_SRCS})
416
target_link_libraries(amqp_sendstring rabbitmq)
17+
18+
add_executable(amqp_exchange_declare amqp_exchange_declare.c ${COMMON_SRCS})
19+
target_link_libraries(amqp_exchange_declare rabbitmq)
20+
21+
add_executable(amqp_listen amqp_listen.c ${COMMON_SRCS})
22+
target_link_libraries(amqp_listen rabbitmq)
23+
24+
add_executable(amqp_producer amqp_producer.c ${COMMON_SRCS})
25+
target_link_libraries(amqp_producer rabbitmq)
26+
27+
add_executable(amqp_consumer amqp_consumer.c ${COMMON_SRCS})
28+
target_link_libraries(amqp_consumer rabbitmq)
29+
30+
add_executable(amqp_unbind amqp_unbind.c ${COMMON_SRCS})
31+
target_link_libraries(amqp_unbind rabbitmq)
32+
33+
add_executable(amqp_bind amqp_bind.c ${COMMON_SRCS})
34+
target_link_libraries(amqp_bind rabbitmq)
35+
36+
add_executable(amqp_listenq amqp_listenq.c ${COMMON_SRCS})
37+
target_link_libraries(amqp_listenq rabbitmq)

0 commit comments

Comments
 (0)