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/BuildInstallSettings.cmake | 133 +++++++ cpp/CMakeLists.txt | 147 ++------ cpp/docs/api/CMakeLists.txt | 6 +- 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 + cpp/src/CMakeLists.txt | 4 +- 38 files changed, 3898 insertions(+), 3316 deletions(-) create mode 100644 cpp/BuildInstallSettings.cmake 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') diff --git a/cpp/BuildInstallSettings.cmake b/cpp/BuildInstallSettings.cmake new file mode 100644 index 0000000000..6aa5175233 --- /dev/null +++ b/cpp/BuildInstallSettings.cmake @@ -0,0 +1,133 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Settings related to the Qpid build and install CMake/CTest/CPack procedure. +# These are used by both the C++ and WCF components. + +set (QPID_VERSION_MAJOR 0) +set (QPID_VERSION_MINOR 6) + +# When doing installs, there are a number of components that the item can +# be associated with. Since there may be different sets of components desired +# for the various platforms, the component names are defined here. When +# setting the COMPONENT in an install directive, use these to ensure that +# the item is installed correctly. + +if (WIN32) + # Install types; these defines the component sets that are installed. + # Each component (below) indicates which of these install type(s) it is + # included in. The user can refine the components at install time. + set (CPACK_ALL_INSTALL_TYPES Broker Development Full) + + set (QPID_COMPONENT_COMMON Common) + set (CPACK_COMPONENT_COMMON_INSTALL_TYPES Broker Development Full) + set (CPACK_COMPONENT_COMMON_DISPLAY_NAME "Required common runtime items") + set (CPACK_COMPONENT_COMMON_DESCRIPTION + "Run-time library common to all runtime components in Qpid.\nThis item is required by both broker and client components.") + + set (QPID_COMPONENT_BROKER Broker) + set (CPACK_COMPONENT_BROKER_DEPENDS Common) + set (CPACK_COMPONENT_BROKER_INSTALL_TYPES Broker Full) + set (CPACK_COMPONENT_BROKER_DISPLAY_NAME "Broker") + set (CPACK_COMPONENT_BROKER_DESCRIPTION + "Messaging broker; controls message flow within the system.\nAt least one broker is required to run any messaging application.") + + set (QPID_COMPONENT_CLIENT Client) + set (CPACK_COMPONENT_CLIENT_DEPENDS Common) + set (CPACK_COMPONENT_CLIENT_INSTALL_TYPES Development Full) + set (CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client runtime libraries") + set (CPACK_COMPONENT_CLIENT_DESCRIPTION + "Runtime library components required to build and execute a client application.") + + set (QPID_COMPONENT_CLIENT_INCLUDE ClientInclude) + set (CPACK_COMPONENT_CLIENTINCLUDE_INSTALL_TYPES Development Full) + set (CPACK_COMPONENT_CLIENTINCLUDE_DISPLAY_NAME + "Client programming header files") + set (CPACK_COMPONENT_CLIENTINCLUDE_DESCRIPTION + "C++ header files required to build any Qpid messaging application.") + + set (QPID_COMPONENT_EXAMPLES Examples) + set (CPACK_COMPONENT_EXAMPLES_INSTALL_TYPES Development Full) + set (CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "C++ Client programming examples") + set (CPACK_COMPONENT_EXAMPLES_DESCRIPTION + "Example source code for using the C++ Client.") + + set (QPID_COMPONENT_QMF QMF) + set (CPACK_COMPONENT_QMF_INSTALL_TYPES Development Full) + set (CPACK_COMPONENT_QMF_DISPLAY_NAME + "Qpid Management Framework (QMF)") + set (CPACK_COMPONENT_QMF_DESCRIPTION + "QMF Agent allows you to embed QMF management in your program.\nQMF Console allows you to build management programs using QMF.") + + set (QPID_INSTALL_BINDIR bin CACHE STRING + "Directory to install user executables") + set (QPID_INSTALL_CONFDIR conf CACHE STRING + "Directory to install configuration files") + set (QPID_INSTALL_DATADIR conf CACHE STRING + "Directory to install read-only arch.-independent data root") + set (QPID_INSTALL_EXAMPLESDIR examples CACHE STRING + "Directory to install programming examples in") + set (QPID_INSTALL_HTMLDIR html CACHE STRING + "Directory to install HTML documentation") + set (QPID_INSTALL_INCLUDEDIR include CACHE STRING + "Directory to install programming header files") + set (QPID_INSTALL_LIBDIR bin CACHE STRING + "Directory to install library files") + set (QPID_INSTALL_SBINDIR bin CACHE STRING + "Directory to install system admin executables") + set (QPIDC_MODULE_DIR plugins/client CACHE STRING + "Directory to load client plug-in modules from") + set (QPIDD_MODULE_DIR plugins/broker CACHE STRING + "Directory to load broker plug-in modules from") +endif (WIN32) + +if (CMAKE_SYSTEM_NAME STREQUAL Linux) + set (QPID_COMPONENT_BROKER runtime) + set (QPID_COMPONENT_CLIENT runtime) + set (QPID_COMPONENT_COMMON runtime) + set (CPACK_COMPONENT_RUNTIME_DISPLAY_NAME + "Items required to run broker and/or client programs") + set (QPID_COMPONENT_CLIENT_INCLUDE development) + set (QPID_COMPONENT_EXAMPLES development) + set (QPID_COMPONENT_QMF development) + set (CPACK_COMPONENT_DEVELOPMENT_DISPLAY_NAME + "Items required to build new C++ Qpid client programs") + + + set (QPID_INSTALL_BINDIR bin CACHE STRING + "Directory to install user executables") + set (QPID_INSTALL_CONFDIR /etc/qpid CACHE STRING + "Directory to install configuration files") + set (QPID_INSTALL_DATADIR share/qpid CACHE STRING + "Directory to install read-only arch.-independent data root") + set (QPID_INSTALL_EXAMPLESDIR share/examples CACHE STRING + "Directory to install programming examples in") + set (QPID_INSTALL_HTMLDIR html CACHE STRING + "Directory to install HTML documentation") + set (QPID_INSTALL_INCLUDEDIR include CACHE STRING + "Directory to install programming header files") + set (QPID_INSTALL_LIBDIR lib CACHE STRING + "Directory to install library files") + set (QPID_INSTALL_SBINDIR sbin CACHE STRING + "Directory to install system admin executables") + set (QPIDC_MODULE_DIR ${QPID_INSTALL_LIBDIR}/qpid/client CACHE STRING + "Directory to load client plug-in modules from") + set (QPIDD_MODULE_DIR ${QPID_INSTALL_LIBDIR}/qpid/daemon CACHE STRING + "Directory to load broker plug-in modules from") +endif (CMAKE_SYSTEM_NAME STREQUAL Linux) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index dd5154781e..40646035a0 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -23,106 +23,48 @@ if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) -set (QPID_VERSION_MAJOR 0) -set (QPID_VERSION_MINOR 6) +include(BuildInstallSettings.cmake) + set (qpidc_version ${QPID_VERSION_MAJOR}.${QPID_VERSION_MINOR}) enable_testing() include (CTest) -# When doing installs, there are a number of components that the item can -# be associated with. Since there may be different sets of components desired -# for the various platforms, the component names are defined here. When -# setting the COMPONENT in an install directive, use these to ensure that -# the item is installed correctly. -# +# Overall packaging/install options. # This section also has all the setup for various packaging-specific options. +set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") if (WIN32) - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") + # Include installing the MSVCRT library + include(InstallRequiredSystemLibraries) + set (CPACK_GENERATOR "NSIS") set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/NSIS\\\\qpid-icon.ico") set (CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/NSIS\\\\qpid-icon.ico") set (CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/NSIS\\\\qpid-install-banner.bmp") + set (CPACK_NSIS_URL_INFO_ABOUT "http://qpid.apache.org/") + # Needs this to correctly set up Start menu links later. + set (CPACK_PACKAGE_EXECUTABLES "") - # Install types; these defines the component sets that are installed. - # Each component (below) indicates which of these install type(s) it is - # included in. The user can refine the components at install time. - set (CPACK_ALL_INSTALL_TYPES Broker Development Full) - - set (QPID_COMPONENT_COMMON Common) - set (CPACK_COMPONENT_COMMON_INSTALL_TYPES Broker Development Full) - set (CPACK_COMPONENT_COMMON_DISPLAY_NAME "Required common runtime items") - set (CPACK_COMPONENT_COMMON_DESCRIPTION - "Run-time library common to all runtime components in Qpid.\n - This item is required by both broker and client components.") - - set (QPID_COMPONENT_BROKER Broker) - set (CPACK_COMPONENT_BROKER_DEPENDS Common) - set (CPACK_COMPONENT_BROKER_INSTALL_TYPES Broker Full) - set (CPACK_COMPONENT_BROKER_DISPLAY_NAME "Broker") - set (CPACK_COMPONENT_BROKER_DESCRIPTION - "Messaging broker; controls message flow within the system.\n - At least one broker is required to run any messaging application.") - - set (QPID_COMPONENT_CLIENT Client) - set (CPACK_COMPONENT_CLIENT_DEPENDS Common) - set (CPACK_COMPONENT_CLIENT_INSTALL_TYPES Development Full) - set (CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client runtime libraries") - set (CPACK_COMPONENT_CLIENT_DESCRIPTION - "Runtime library components required to build and execute a client application.") - - set (QPID_COMPONENT_CLIENT_INCLUDE ClientInclude) - set (CPACK_COMPONENT_CLIENTINCLUDE_INSTALL_TYPES Development Full) - set (CPACK_COMPONENT_CLIENTINCLUDE_DISPLAY_NAME - "Client programming header files") - set (CPACK_COMPONENT_CLIENTINCLUDE_DESCRIPTION - "C++ header files required to build any Qpid messaging application.") - - set (QPID_COMPONENT_QMF QMF) - set (CPACK_COMPONENT_QMF_INSTALL_TYPES Development Full) - set (CPACK_COMPONENT_QMF_DISPLAY_NAME - "Qpid Management Framework (QMF)") - set (CPACK_COMPONENT_QMF_DESCRIPTION - "QMF Agent allows you to embed QMF management in your program.\n - QMF Console allows you to build management programs using QMF.") - - set (QPID_INSTALL_BINDIR bin CACHE STRING - "Directory to install user executables") - set (QPID_INSTALL_CONFDIR conf CACHE STRING - "Directory to install configuration files") - set (QPID_INSTALL_DATADIR conf CACHE STRING - "Directory to install read-only arch.-independent data root") - set (QPID_INSTALL_HTMLDIR html CACHE STRING - "Directory to install HTML documentation") - set (QPID_INSTALL_INCLUDEDIR include CACHE STRING - "Directory to install programming header files") - set (QPID_INSTALL_LIBDIR bin CACHE STRING - "Directory to install library files") - set (QPID_INSTALL_SBINDIR bin CACHE STRING - "Directory to install system admin executables") - set (QPIDC_MODULE_DIR plugins/client CACHE STRING - "Directory to load client plug-in modules from") - set (QPIDD_MODULE_DIR plugins/broker CACHE STRING - "Directory to load broker plug-in modules from") - - # The WCF/C++ client is built separately (it doesn't have a CMakeLists.txt) - # but installed with the C++ components on Windows. - # Don't freak out if it's not there (but it may be good to freak out if - # building the real one...) + # The WCF/C++ client is built separately (it doesn't build via CMake) + # but is installed with the C++ components on Windows. install (PROGRAMS - ../wcf/src/Apache/Qpid/Channel/bin/Debug/Apache.Qpid.Channel.dll - ../wcf/src/Apache/Qpid/Channel/bin/Debug/Apache.Qpid.Interop.dll + ${CMAKE_SOURCE_DIR}/../wcf/src/Apache/Qpid/Channel/bin/Debug/Apache.Qpid.Channel.dll + ${CMAKE_SOURCE_DIR}/../wcf/src/Apache/Qpid/Channel/bin/Debug/Apache.Qpid.Interop.dll DESTINATION ${QPID_INSTALL_LIBDIR} - COMPONENT ${QPID_COMPONENT_CLIENT} - OPTIONAL) -# Not sure about this syntax yet... or how to only do it if Client is installed. -# set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS " -# gacutil -I '$INSTDIR\\${QPID_INSTALL_LIBDIR}\\Apache.Qpid.Channel.dll' -# gacutil -I '$INSTDIR\\${QPID_INSTALL_LIBDIR}\\Apache.Qpid.Interop.dll' -# ") -# set (CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " -# gacutil /u 'Apache.Qpid.Channel' -# gacutil /u 'Apache.Qpid.Interop' -# ") + COMPONENT ${QPID_COMPONENT_CLIENT}) + install (DIRECTORY ${CMAKE_SOURCE_DIR}/../wcf/samples/Channel + DESTINATION ${QPID_INSTALL_EXAMPLESDIR} + COMPONENT ${QPID_COMPONENT_EXAMPLES} + PATTERN ".svn" EXCLUDE) + +set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS " + ExecWait 'gacutil -I \\\"$INSTDIR\\\\${QPID_INSTALL_LIBDIR}\\\\Apache.Qpid.Channel.dll\\\"' + ExecWait 'gacutil -I \\\"$INSTDIR\\\\${QPID_INSTALL_LIBDIR}\\\\Apache.Qpid.Interop.dll\\\"' + ") +set (CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " + ExecWait 'gacutil /u \\\"Apache.Qpid.Channel\\\"' + ExecWait 'gacutil /u \\\"Apache.Qpid.Interop\\\"' + ") + endif (WIN32) if (CMAKE_SYSTEM_NAME STREQUAL Linux) @@ -130,36 +72,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL Linux) # /etc and most in the install location, we need to use a DESTDIR build # rather than the usual simple use of CPACK_INSTALL_PREFIX. set (CPACK_SET_DESTDIR ON) - - set (QPID_COMPONENT_BROKER runtime) - set (QPID_COMPONENT_CLIENT runtime) - set (QPID_COMPONENT_COMMON runtime) - set (CPACK_COMPONENT_RUNTIME_DISPLAY_NAME - "Items required to run broker and/or client programs") - set (QPID_COMPONENT_CLIENT_INCLUDE development) - set (QPID_COMPONENT_QMF development) - set (CPACK_COMPONENT_DEVELOPMENT_DISPLAY_NAME - "Items required to build new C++ Qpid client programs") - - - set (QPID_INSTALL_BINDIR bin CACHE STRING - "Directory to install user executables") - set (QPID_INSTALL_CONFDIR /etc/qpid CACHE STRING - "Directory to install configuration files") - set (QPID_INSTALL_DATADIR share/qpid CACHE STRING - "Directory to install read-only arch.-independent data root") - set (QPID_INSTALL_HTMLDIR html CACHE STRING - "Directory to install HTML documentation") - set (QPID_INSTALL_INCLUDEDIR include CACHE STRING - "Directory to install programming header files") - set (QPID_INSTALL_LIBDIR lib CACHE STRING - "Directory to install library files") - set (QPID_INSTALL_SBINDIR sbin CACHE STRING - "Directory to install system admin executables") - set (QPIDC_MODULE_DIR ${QPID_INSTALL_LIBDIR}/qpid/client CACHE STRING - "Directory to load client plug-in modules from") - set (QPIDD_MODULE_DIR ${QPID_INSTALL_LIBDIR}/qpid/daemon CACHE STRING - "Directory to load broker plug-in modules from") endif (CMAKE_SYSTEM_NAME STREQUAL Linux) set (QPIDC_CONF_FILE ${QPID_INSTALL_CONFDIR}/qpidc.conf CACHE STRING @@ -167,7 +79,6 @@ set (QPIDC_CONF_FILE ${QPID_INSTALL_CONFDIR}/qpidc.conf CACHE STRING set (QPIDD_CONF_FILE ${QPID_INSTALL_CONFDIR}/qpidd.conf CACHE STRING "Name of the Qpid broker configuration file") - install(FILES LICENSE NOTICE README SSL RELEASE_NOTES DESIGN xml/cluster.xml INSTALL-WINDOWS DESTINATION ${QPID_INSTALL_DATADIR}) diff --git a/cpp/docs/api/CMakeLists.txt b/cpp/docs/api/CMakeLists.txt index d701f3be71..1f9573b98a 100644 --- a/cpp/docs/api/CMakeLists.txt +++ b/cpp/docs/api/CMakeLists.txt @@ -32,5 +32,9 @@ if (GEN_DOXYGEN) install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION ${QPID_INSTALL_HTMLDIR} COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE}) - + if (CPACK_GENERATOR STREQUAL "NSIS") + set (CPACK_NSIS_MENU_LINKS + "${QPID_INSTALL_HTMLDIR}/index.html" "Qpid C++ API Documentation" + "https://issues.apache.org/jira/browse/QPID" "Report Qpid Problem") + endif (CPACK_GENERATOR STREQUAL "NSIS") endif (GEN_DOXYGEN) 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 @@ + + +