diff options
author | Gordon Sim <gsim@apache.org> | 2010-05-05 11:17:41 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2010-05-05 11:17:41 +0000 |
commit | 8c0153e035caa90758a6773493d5859716521e30 (patch) | |
tree | 78077da73151b357a20a07d2f83fd98ed1ac66e1 /cpp/examples/messaging/CMakeLists.txt | |
parent | 685d4c67f1282166294a6f8b4d0710b55f0aba5d (diff) | |
download | qpid-python-8c0153e035caa90758a6773493d5859716521e30.tar.gz |
Some cleanup on examples:
* removed obsolete examples (queue-/topic-sender/receiver)
* removed the need to include headers with boost dependencies
* moved the argument handling in darin and spout closer to that of python (and update docs to reflect that)
* changed to ship a manually constructed makefile for messaging examples (generated one doesn't work and maintaining that seems like more work with little benefit)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@941250 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/examples/messaging/CMakeLists.txt')
-rw-r--r-- | cpp/examples/messaging/CMakeLists.txt | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/cpp/examples/messaging/CMakeLists.txt b/cpp/examples/messaging/CMakeLists.txt index b2b2bc3e43..c962f4d065 100644 --- a/cpp/examples/messaging/CMakeLists.txt +++ b/cpp/examples/messaging/CMakeLists.txt @@ -19,14 +19,26 @@ # drain and spout have explicit Boost.program_options usage in them, so be # sure that lib is linked in. -add_example(messaging drain ${Boost_PROGRAM_OPTIONS_LIBRARY}) -add_example(messaging spout ${Boost_PROGRAM_OPTIONS_LIBRARY}) -add_example(messaging queue_receiver) -add_example(messaging queue_sender) +macro(add_messaging_example example) + add_executable(${example} ${example}.cpp OptionParser.cpp) + set_target_properties(${example} PROPERTIES OUTPUT_NAME ${example}) + target_link_libraries(${example} qpidclient ${_boost_libs_needed}) + # For installs, don't install the built example; that would be pointless. + # Install the things a user needs to build the example on-site. + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${example}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.h ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.cpp + DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging + COMPONENT ${QPID_COMPONENT_EXAMPLES}) + if (MSVC) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/messaging_${example}.vcproj + DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging + COMPONENT ${QPID_COMPONENT_EXAMPLES}) + endif (MSVC) -add_example(messaging topic_receiver) -add_example(messaging topic_sender) +endmacro(add_messaging_example) + +add_messaging_example(drain) +add_messaging_example(spout) add_example(messaging map_receiver) add_example(messaging map_sender) |