From 1f8f41f6a00d1efeb1da33f386e0d987408cb593 Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Fri, 13 Nov 2009 00:13:42 +0000 Subject: Move the kit-building settings out of CMakeLists.txt to a new file, BuildInstallSettings.cmake. Changed the examples's vcproj files to refer to the installed header/lib locations instead of in the source tree locations; also adjusted the names to match directories and look sensible in the solution list. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@835652 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/examples/CMakeLists.txt | 46 ++- cpp/examples/README.txt | 22 +- cpp/examples/direct/direct_declare_queues.vcproj | 46 ++- cpp/examples/direct/direct_direct_producer.vcproj | 44 ++- cpp/examples/direct/direct_listener.vcproj | 44 ++- cpp/examples/examples.sln | 118 +++++- .../failover/failover_declare_queues.vcproj | 44 ++- .../failover/failover_replaying_sender.vcproj | 44 ++- .../failover/failover_resuming_receiver.vcproj | 44 ++- cpp/examples/fanout/fanout_fanout_producer.vcproj | 44 ++- cpp/examples/fanout/fanout_listener.vcproj | 44 ++- cpp/examples/pub-sub/CMakeLists.txt | 4 +- cpp/examples/pub-sub/pub-sub_topic_listener.vcproj | 394 +++++++++++++++++++ .../pub-sub/pub-sub_topic_publisher.vcproj | 394 +++++++++++++++++++ cpp/examples/pub-sub/pub_sub_topic_listener.vcproj | 374 ------------------ .../pub-sub/pub_sub_topic_publisher.vcproj | 374 ------------------ cpp/examples/qmf-agent/qmf_agent.vcproj | 44 ++- cpp/examples/qmf-console/CMakeLists.txt | 8 +- .../qmf-console/qmf-console_console.vcproj | 394 +++++++++++++++++++ cpp/examples/qmf-console/qmf-console_ping.vcproj | 419 +++++++++++++++++++++ .../qmf-console/qmf-console_printevents.vcproj | 394 +++++++++++++++++++ .../qmf-console/qmf-console_queuestats.vcproj | 394 +++++++++++++++++++ .../qmf-console/qmf_console_console.vcproj | 374 ------------------ cpp/examples/qmf-console/qmf_console_ping.vcproj | 399 -------------------- .../qmf-console/qmf_console_printevents.vcproj | 374 ------------------ .../qmf-console/qmf_console_queuestats.vcproj | 374 ------------------ .../request-response_client.vcproj | 394 +++++++++++++++++++ .../request-response_server.vcproj | 394 +++++++++++++++++++ .../request_response_client.vcproj | 374 ------------------ .../request_response_server.vcproj | 374 ------------------ .../tradedemo/tradedemo_declare_queues.vcproj | 44 ++- .../tradedemo/tradedemo_topic_listener.vcproj | 44 ++- .../tradedemo/tradedemo_topic_publisher.vcproj | 44 ++- cpp/examples/xml-exchange/CMakeLists.txt | 2 + 34 files changed, 3729 insertions(+), 3195 deletions(-) create mode 100644 cpp/examples/pub-sub/pub-sub_topic_listener.vcproj create mode 100644 cpp/examples/pub-sub/pub-sub_topic_publisher.vcproj delete mode 100644 cpp/examples/pub-sub/pub_sub_topic_listener.vcproj delete mode 100644 cpp/examples/pub-sub/pub_sub_topic_publisher.vcproj create mode 100644 cpp/examples/qmf-console/qmf-console_console.vcproj create mode 100644 cpp/examples/qmf-console/qmf-console_ping.vcproj create mode 100644 cpp/examples/qmf-console/qmf-console_printevents.vcproj create mode 100644 cpp/examples/qmf-console/qmf-console_queuestats.vcproj delete mode 100644 cpp/examples/qmf-console/qmf_console_console.vcproj delete mode 100644 cpp/examples/qmf-console/qmf_console_ping.vcproj delete mode 100644 cpp/examples/qmf-console/qmf_console_printevents.vcproj delete mode 100644 cpp/examples/qmf-console/qmf_console_queuestats.vcproj create mode 100644 cpp/examples/request-response/request-response_client.vcproj create mode 100644 cpp/examples/request-response/request-response_server.vcproj delete mode 100644 cpp/examples/request-response/request_response_client.vcproj delete mode 100644 cpp/examples/request-response/request_response_server.vcproj (limited to 'cpp/examples') diff --git a/cpp/examples/CMakeLists.txt b/cpp/examples/CMakeLists.txt index 126adab32e..759a9f2020 100644 --- a/cpp/examples/CMakeLists.txt +++ b/cpp/examples/CMakeLists.txt @@ -22,17 +22,28 @@ if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) -# This will probably need some fiddling to get right for installed kits. -get_directory_property(QPIDC_TOP PARENT_DIRECTORY) include_directories(${CMAKE_BINARY_DIR}/include) include_directories(${CMAKE_SOURCE_DIR}/include) -# Shouldn't need this... but there are still client header inclusions of Boost. +# Shouldn't need this... but there are still client header inclusions +# of Boost. When building examples at an install site, the Boost files +# should be locatable aside from these settings. include_directories( ${Boost_INCLUDE_DIR} ) link_directories( ${Boost_LIBRARY_DIRS} ) +# Visual Studio needs some Windows-specific simplifications. +# Linux needs to reference the boost libs, even though they should be +# resolved via the Qpid libs. if (MSVC) add_definitions( /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" ) + # On Windows, prevent the accidental inclusion of Boost headers from + # autolinking in the Boost libs. There should be no direct references to + # Boost in the examples, and references via qpidclient/qpidcommon are + # resolved in the Qpid libs. + add_definitions( /D "BOOST_ALL_DYN_LINK" /D "BOOST_ALL_NO_LIB" ) +else (MSVC) + set(_boost_libs_needed ${Boost_PROGRAM_OPTIONS_LIBRARY} + ${Boost_FILESYSTEM_LIBRARY}) endif (MSVC) # There are numerous duplicate names within the examples. Since all target @@ -44,15 +55,36 @@ macro(add_example subdir example) set_target_properties(${subdir}_${example} PROPERTIES OUTPUT_NAME ${example}) if (${ARGC} GREATER 2) target_link_libraries(${subdir}_${example} ${ARGN} qpidclient - ${Boost_PROGRAM_OPTIONS_LIBRARY} - ${Boost_FILESYSTEM_LIBRARY}) + ${_boost_libs_needed}) else (${ARGC} GREATER 2) target_link_libraries(${subdir}_${example} qpidclient - ${Boost_PROGRAM_OPTIONS_LIBRARY} - ${Boost_FILESYSTEM_LIBRARY}) + ${_boost_libs_needed}) endif (${ARGC} GREATER 2) + # 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 + DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/${subdir} + COMPONENT ${QPID_COMPONENT_EXAMPLES}) + if (MSVC) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}_${example}.vcproj + DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/${subdir} + COMPONENT ${QPID_COMPONENT_EXAMPLES}) + endif (MSVC) + endmacro(add_example) +install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.txt + ${CMAKE_CURRENT_SOURCE_DIR}/README.verify + ${CMAKE_CURRENT_SOURCE_DIR}/verify + ${CMAKE_CURRENT_SOURCE_DIR}/verify_all + DESTINATION ${QPID_INSTALL_EXAMPLESDIR} + COMPONENT ${QPID_COMPONENT_EXAMPLES}) +if (MSVC) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples.sln + DESTINATION ${QPID_INSTALL_EXAMPLESDIR} + COMPONENT ${QPID_COMPONENT_EXAMPLES}) +endif (MSVC) + add_subdirectory(direct) add_subdirectory(failover) add_subdirectory(fanout) diff --git a/cpp/examples/README.txt b/cpp/examples/README.txt index b5e9c49f9a..0663286664 100644 --- a/cpp/examples/README.txt +++ b/cpp/examples/README.txt @@ -16,12 +16,12 @@ On Linux: # ./declare_queues host1 9999 On Windows: - C:\Program Files\Apache\qpidc-0.5\examples\direct> declare_queues host1 9999 + C:\Program Files\qpidc-0.6\examples\direct> declare_queues host1 9999 The qpid C++ broker executable is named qpidd on Linux and qpidd.exe on Windows. The default install locations are: - Linux: /usr/sbin -- Windows: C:\Program Files\Apache\qpidc-0.5\bin +- Windows: C:\Program Files\qpidc-0.6\bin In a C++ source distribution the broker is located in the src subdirectory (generally, from this examples directory, ../src). @@ -52,9 +52,9 @@ On Linux: # ./listener On Windows: - C:\Program Files\Apache\qpidc-0.5\examples\direct> declare_queues - C:\Program Files\Apache\qpidc-0.5\examples\direct> direct_producer - C:\Program Files\Apache\qpidc-0.5\examples\direct> listener + C:\Program Files\qpidc-0.6\examples\direct> declare_queues + C:\Program Files\qpidc-0.6\examples\direct> direct_producer + C:\Program Files\qpidc-0.6\examples\direct> listener Note that there is no requirement for the listener to be running before the messages are published. The messages are stored in the queue until consumed @@ -86,9 +86,9 @@ On Linux: # ./fanout_producer On Windows: - C:\Program Files\Apache\qpidc-0.5\examples\fanout> listener + C:\Program Files\qpidc-0.6\examples\fanout> listener - C:\Program Files\Apache\qpidc-0.5\examples\direct> fanout_producer + C:\Program Files\qpidc-0.6\examples\direct> fanout_producer == Publisher/Subscriber == @@ -122,9 +122,9 @@ On Linux: # ./topic_publisher On Windows: - C:\Program Files\Apache\qpidc-0.5\examples\pub-sub> topic_listener + C:\Program Files\qpidc-0.6\examples\pub-sub> topic_listener - C:\Program Files\Apache\qpidc-0.5\examples\pub-sub> topic_publisher + C:\Program Files\qpidc-0.6\examples\pub-sub> topic_publisher == Request/Response == @@ -147,8 +147,8 @@ On Linux: # ./client On Windows: - C:\Program Files\Apache\qpidc-0.5\examples\request-response> server - C:\Program Files\Apache\qpidc-0.5\examples\request-response> client + C:\Program Files\qpidc-0.6\examples\request-response> server + C:\Program Files\qpidc-0.6\examples\request-response> client == QMF Agent == diff --git a/cpp/examples/direct/direct_declare_queues.vcproj b/cpp/examples/direct/direct_declare_queues.vcproj index 097b0ee3bf..ae6bfaac6a 100644 --- a/cpp/examples/direct/direct_declare_queues.vcproj +++ b/cpp/examples/direct/direct_declare_queues.vcproj @@ -1,4 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/examples/pub-sub/pub-sub_topic_publisher.vcproj b/cpp/examples/pub-sub/pub-sub_topic_publisher.vcproj new file mode 100644 index 0000000000..f67de44d20 --- /dev/null +++ b/cpp/examples/pub-sub/pub-sub_topic_publisher.vcproj @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/examples/pub-sub/pub_sub_topic_listener.vcproj b/cpp/examples/pub-sub/pub_sub_topic_listener.vcproj deleted file mode 100644 index 72a6543a13..0000000000 --- a/cpp/examples/pub-sub/pub_sub_topic_listener.vcproj +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/examples/pub-sub/pub_sub_topic_publisher.vcproj b/cpp/examples/pub-sub/pub_sub_topic_publisher.vcproj deleted file mode 100644 index 5182b30435..0000000000 --- a/cpp/examples/pub-sub/pub_sub_topic_publisher.vcproj +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/examples/qmf-agent/qmf_agent.vcproj b/cpp/examples/qmf-agent/qmf_agent.vcproj index aa39f8d60d..2a1c04b367 100644 --- a/cpp/examples/qmf-agent/qmf_agent.vcproj +++ b/cpp/examples/qmf-agent/qmf_agent.vcproj @@ -1,4 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/examples/qmf-console/qmf-console_ping.vcproj b/cpp/examples/qmf-console/qmf-console_ping.vcproj new file mode 100644 index 0000000000..21e01389ad --- /dev/null +++ b/cpp/examples/qmf-console/qmf-console_ping.vcproj @@ -0,0 +1,419 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/examples/qmf-console/qmf-console_printevents.vcproj b/cpp/examples/qmf-console/qmf-console_printevents.vcproj new file mode 100644 index 0000000000..478b71b678 --- /dev/null +++ b/cpp/examples/qmf-console/qmf-console_printevents.vcproj @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/examples/qmf-console/qmf-console_queuestats.vcproj b/cpp/examples/qmf-console/qmf-console_queuestats.vcproj new file mode 100644 index 0000000000..ee0d2acc98 --- /dev/null +++ b/cpp/examples/qmf-console/qmf-console_queuestats.vcproj @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/examples/qmf-console/qmf_console_console.vcproj b/cpp/examples/qmf-console/qmf_console_console.vcproj deleted file mode 100644 index 67e34fde98..0000000000 --- a/cpp/examples/qmf-console/qmf_console_console.vcproj +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/examples/qmf-console/qmf_console_ping.vcproj b/cpp/examples/qmf-console/qmf_console_ping.vcproj deleted file mode 100644 index 6e9bc6a6c6..0000000000 --- a/cpp/examples/qmf-console/qmf_console_ping.vcproj +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/examples/qmf-console/qmf_console_printevents.vcproj b/cpp/examples/qmf-console/qmf_console_printevents.vcproj deleted file mode 100644 index b11f4b8d31..0000000000 --- a/cpp/examples/qmf-console/qmf_console_printevents.vcproj +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/examples/qmf-console/qmf_console_queuestats.vcproj b/cpp/examples/qmf-console/qmf_console_queuestats.vcproj deleted file mode 100644 index 8c0bce672c..0000000000 --- a/cpp/examples/qmf-console/qmf_console_queuestats.vcproj +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/examples/request-response/request-response_client.vcproj b/cpp/examples/request-response/request-response_client.vcproj new file mode 100644 index 0000000000..3c98482400 --- /dev/null +++ b/cpp/examples/request-response/request-response_client.vcproj @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/examples/request-response/request-response_server.vcproj b/cpp/examples/request-response/request-response_server.vcproj new file mode 100644 index 0000000000..f685f9d949 --- /dev/null +++ b/cpp/examples/request-response/request-response_server.vcproj @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/examples/request-response/request_response_client.vcproj b/cpp/examples/request-response/request_response_client.vcproj deleted file mode 100644 index c40478ca7a..0000000000 --- a/cpp/examples/request-response/request_response_client.vcproj +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/examples/request-response/request_response_server.vcproj b/cpp/examples/request-response/request_response_server.vcproj deleted file mode 100644 index 170caa0952..0000000000 --- a/cpp/examples/request-response/request_response_server.vcproj +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/examples/tradedemo/tradedemo_declare_queues.vcproj b/cpp/examples/tradedemo/tradedemo_declare_queues.vcproj index 483ad2e6c9..aa9c8911d7 100644 --- a/cpp/examples/tradedemo/tradedemo_declare_queues.vcproj +++ b/cpp/examples/tradedemo/tradedemo_declare_queues.vcproj @@ -1,4 +1,24 @@ + + +