You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by mc...@apache.org on 2013/07/24 20:14:08 UTC

svn commit: r1506646 - in /qpid/proton/trunk: CMakeLists.txt examples/messenger/c/CMakeLists.txt

Author: mcpierce
Date: Wed Jul 24 18:14:07 2013
New Revision: 1506646

URL: http://svn.apache.org/r1506646
Log:
QPID-364: Install C examples.

Added a install variable, EXAMPLES_INSTALL_DIR.

Installs the send.c, recv.c, CMakeLists.txt files from the
examples/messenger/c directory. Also installs the getopt.c and getopt.h
files, related LICENSE, and the misc_defs.h and misc_funcs.inc files.

Modified:
    qpid/proton/trunk/CMakeLists.txt
    qpid/proton/trunk/examples/messenger/c/CMakeLists.txt

Modified: qpid/proton/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/CMakeLists.txt?rev=1506646&r1=1506645&r2=1506646&view=diff
==============================================================================
--- qpid/proton/trunk/CMakeLists.txt (original)
+++ qpid/proton/trunk/CMakeLists.txt Wed Jul 24 18:14:07 2013
@@ -69,6 +69,14 @@ set (SYSCONF_INSTALL_DIR etc CACHE PATH 
 set (SHARE_INSTALL_DIR share CACHE PATH "Shared read only data directory")
 set (MAN_INSTALL_DIR share/man CACHE PATH "Manpage directory")
 
+if (WIN32)
+  set (EXAMPLES_INSTALL_DIR proton/examples)
+endif (WIN32)
+
+if (UNIX)
+  set (EXAMPLES_INSTALL_DIR ${SHARE_INSTALL_DIR}/proton/examples)
+endif (UNIX)
+
 set (JAVA_INSTALL_DIR ${SHARE_INSTALL_DIR}/java CACHE PATH "Installation directory for all JARs except those using JNI")
 set (JNI_INSTALL_DIR ${LIB_INSTALL_DIR}/java CACHE PATH "Installation directory for all JARs utilising JNI")
 set (JNI_SHARED_LIB_INSTALL_DIR ${LIB_INSTALL_DIR} CACHE PATH "Installation directory for shared objects used by JNI JARs")
@@ -99,6 +107,19 @@ add_subdirectory(proton-c)
 install (FILES LICENSE README TODO
          DESTINATION ${PROTON_SHARE})
 
+# install the C messenger example
+install (FILES examples/messenger/c/CMakeLists.txt
+               examples/messenger/c/send.c
+               examples/messenger/c/recv.c
+         DESTINATION ${EXAMPLES_INSTALL_DIR}/messenger)
+
+install (FILES examples/include/pncompat/internal/LICENSE
+               examples/include/pncompat/internal/getopt.c
+               examples/include/pncompat/internal/getopt.h
+               examples/include/pncompat/misc_defs.h
+               examples/include/pncompat/misc_funcs.inc
+         DESTINATION ${EXAMPLES_INSTALL_DIR}/messenger/pncompat)
+
 # add relevant CTest support
 find_program (MAVEN_EXECUTABLE mvn DOC "Location of the maven program")
 if (JAVA_FOUND AND MAVEN_EXECUTABLE)

Modified: qpid/proton/trunk/examples/messenger/c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/c/CMakeLists.txt?rev=1506646&r1=1506645&r2=1506646&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/c/CMakeLists.txt (original)
+++ qpid/proton/trunk/examples/messenger/c/CMakeLists.txt Wed Jul 24 18:14:07 2013
@@ -17,6 +17,12 @@
 # under the License.
 #
 
+cmake_minimum_required (VERSION 2.6)
+
+find_path(PROTON_INCLUDE_DIR proton/types.h)
+find_library(PROTON_LIBRARY
+             NAMES qpid-proton)
+
 add_executable(recv recv.c)
 add_executable(send send.c)
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org