Author: mcpierce
Date: Fri Jan 18 13:36:51 2013
New Revision: 1435129

URL: http://svn.apache.org/viewvc?rev=1435129&view=rev
Log:
JIRA-4372: Added a CMakeLists.txt file for messaging examples.

In the messaging/dist_extra directory is a CMakeLists.txt file that will
be shipped under both the autotool and cmake builds with the messaging
examples.

Added:
    qpid/trunk/qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt
      - copied, changed from r1434863, 
qpid/trunk/qpid/cpp/examples/messaging/CMakeLists.txt
Removed:
    qpid/trunk/qpid/cpp/examples/messaging/extra_dist/Makefile
Modified:
    qpid/trunk/qpid/cpp/examples/messaging/CMakeLists.txt
    qpid/trunk/qpid/cpp/examples/messaging/Makefile.am

Modified: qpid/trunk/qpid/cpp/examples/messaging/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/messaging/CMakeLists.txt?rev=1435129&r1=1435128&r2=1435129&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/messaging/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/examples/messaging/CMakeLists.txt Fri Jan 18 13:36:51 
2013
@@ -17,47 +17,18 @@
 # under the License.
 #
 
-# drain and spout have explicit Boost.program_options usage in them, so be
-# sure that lib is linked in.
-
-macro(add_messaging_example example)
-  add_executable(${example} ${example}.cpp OptionParser.cpp)
-  set_target_properties(${example} PROPERTIES OUTPUT_NAME ${example})
-  target_link_libraries(${example} qpidmessaging ${_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)
-
-endmacro(add_messaging_example)
-
-add_messaging_example(drain)
-add_messaging_example(spout)
-
-add_messaging_example(map_receiver)
-add_messaging_example(map_sender)
-
-add_messaging_example(client)
-add_messaging_example(server)
-
-# These don't need Boost or OptionParser
-add_executable(hello_world hello_world.cpp)
-set_target_properties(hello_world PROPERTIES OUTPUT_NAME hello_world)
-target_link_libraries(hello_world qpidmessaging)
-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/hello_world.cpp
-           DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging
-           COMPONENT ${QPID_COMPONENT_EXAMPLES})
-
-add_executable(hello_xml hello_xml.cpp)
-set_target_properties(hello_xml PROPERTIES OUTPUT_NAME hello_xml)
-target_link_libraries(hello_xml qpidmessaging)
-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/hello_xml.cpp
+install (FILES
+           ${CMAKE_CURRENT_SOURCE_DIR}/extra_dist/CMakeLists.txt
+           ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.cpp
+           ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.h
+           ${CMAKE_CURRENT_SOURCE_DIR}/hello_world.cpp
+           ${CMAKE_CURRENT_SOURCE_DIR}/hello_xml.cpp
+           ${CMAKE_CURRENT_SOURCE_DIR}/drain.cpp
+           ${CMAKE_CURRENT_SOURCE_DIR}/spout.cpp
+           ${CMAKE_CURRENT_SOURCE_DIR}/map_receiver.cpp
+           ${CMAKE_CURRENT_SOURCE_DIR}/map_sender.cpp
+           ${CMAKE_CURRENT_SOURCE_DIR}/client.cpp
+           ${CMAKE_CURRENT_SOURCE_DIR}/server.cpp
            DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging
            COMPONENT ${QPID_COMPONENT_EXAMPLES})
 

Modified: qpid/trunk/qpid/cpp/examples/messaging/Makefile.am
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/messaging/Makefile.am?rev=1435129&r1=1435128&r2=1435129&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/messaging/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/examples/messaging/Makefile.am Fri Jan 18 13:36:51 2013
@@ -62,7 +62,7 @@ examples_DATA=                 \
        server.cpp             \
        map_sender.cpp         \
        map_receiver.cpp       \
-        extra_dist/Makefile
+       extra_dist/CMakeLists.txt
 
 EXTRA_DIST=                  \
        $(examples_DATA)     \

Copied: qpid/trunk/qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt (from 
r1434863, qpid/trunk/qpid/cpp/examples/messaging/CMakeLists.txt)
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt?p2=qpid/trunk/qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt&p1=qpid/trunk/qpid/cpp/examples/messaging/CMakeLists.txt&r1=1434863&r2=1435129&rev=1435129&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/messaging/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt Fri Jan 18 
13:36:51 2013
@@ -17,16 +17,22 @@
 # under the License.
 #
 
+cmake_minimum_required (VERSION 2.6)
+
+project (Examples)
+
 # drain and spout have explicit Boost.program_options usage in them, so be
 # sure that lib is linked in.
 
 macro(add_messaging_example example)
   add_executable(${example} ${example}.cpp OptionParser.cpp)
   set_target_properties(${example} PROPERTIES OUTPUT_NAME ${example})
-  target_link_libraries(${example} qpidmessaging ${_boost_libs_needed})
+  target_link_libraries(${example} qpidtypes qpidmessaging 
${_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
+  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)
@@ -50,14 +56,7 @@ add_messaging_example(server)
 add_executable(hello_world hello_world.cpp)
 set_target_properties(hello_world PROPERTIES OUTPUT_NAME hello_world)
 target_link_libraries(hello_world qpidmessaging)
-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/hello_world.cpp
-           DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging
-           COMPONENT ${QPID_COMPONENT_EXAMPLES})
 
 add_executable(hello_xml hello_xml.cpp)
 set_target_properties(hello_xml PROPERTIES OUTPUT_NAME hello_xml)
 target_link_libraries(hello_xml qpidmessaging)
-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/hello_xml.cpp
-           DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging
-           COMPONENT ${QPID_COMPONENT_EXAMPLES})
-



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to