qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1582416 - in /qpid/proton/trunk: ./ examples/messenger/c/ proton-c/ proton-c/bindings/ proton-c/bindings/perl/ proton-c/bindings/php/ proton-c/bindings/python/ proton-c/bindings/ruby/ proton-c/src/tests/ proton-j/
Date Thu, 27 Mar 2014 17:31:20 GMT
Author: rhs
Date: Thu Mar 27 17:31:19 2014
New Revision: 1582416

URL: http://svn.apache.org/r1582416
Log:
PROTON-538: fixed install to not use irregular paths, marked a lot of noisy variables as advanced,
removed extra level of caching from cmake variables that had confusing effects, updated the
readme to match what the build actually does

Modified:
    qpid/proton/trunk/CMakeLists.txt
    qpid/proton/trunk/README
    qpid/proton/trunk/examples/messenger/c/CMakeLists.txt
    qpid/proton/trunk/proton-c/CMakeLists.txt
    qpid/proton/trunk/proton-c/bindings/CMakeLists.txt
    qpid/proton/trunk/proton-c/bindings/perl/CMakeLists.txt
    qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt
    qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt
    qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt
    qpid/proton/trunk/proton-c/src/tests/CMakeLists.txt
    qpid/proton/trunk/proton-j/CMakeLists.txt

Modified: qpid/proton/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/CMakeLists.txt (original)
+++ qpid/proton/trunk/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -69,26 +69,31 @@ 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")
 
+mark_as_advanced (INCLUDE_INSTALL_DIR LIB_INSTALL_DIR SYSCONF_INSTALL_DIR SHARE_INSTALL_DIR
MAN_INSTALL_DIR)
+
 ## LANGUAGE BINDINGS
-#  If ASK_$LANG is 1 then the language is queried for the directory into which
-#  those language bindings are to be installed. If it is 0 then the bindings
-#  are installed to $CMAKE_INSTALL_PREFIX/bindings/$LANG
-#
-set (BINDINGS_DIR bindings CACHE PATH "Default directory for language bindings")
-set (ASK_PERL 0 CACHE INTEGER "Ask Perl for install directories")
-set (ASK_PHP 0 CACHE INTEGER "Ask PHP for install directories")
-set (ASK_PYTHON 0 CACHE INTEGER "Ask Python for install directories")
-set (ASK_RUBY 0 CACHE INTEGER "Ask Ruby for install directories")
-set (ASK_ALL 0 CACHE INTEGER "If 1 then ask all languages for their directory")
-
-if (ASK_ALL)
-  set (ASK_PERL 1)
-  set (ASK_PHP 1)
-  set (ASK_PYTHON 1)
-  set (ASK_RUBY 1)
-endif (ASK_ALL)
 
-message(STATUS "PYTHON_ARCHLIB_DIR=${PYTHON_ARCHLIB_DIR}")
+# Default directory for language bindings not being installed into
+# system specified locations.
+set (BINDINGS_DIR ${LIB_INSTALL_DIR}/proton/bindings)
+
+set (SYSINSTALL_BINDINGS "*UNSPECIFIED*" CACHE BOOL "If SYSINSTALL_BINDINGS is OFF then proton
bindings will be installed underneath ${BINDINGS_DIR} and each user will need to modify their
interpreter configuration to load the appropriate binding. If SYSINSTALL_BINDINGS is ON, then
each language interpreter will be queried for the appropriate directory and proton bindings
will be installed and available system wide with no additional per user configuration.")
+
+if (SYSINSTALL_BINDINGS STREQUAL "*UNSPECIFIED*")
+  message(WARNING "SYSINSTALL_BINDINGS is unspecified, defaulting it to OFF. Please note
that the default install behaviour of proton has changed. Proton bindings by default will
now be installed under ${BINDINGS_DIR} and will no longer be found by system interpreters.
This means that every user will be required to manually configure their interpreters to locate
the proton bindings. If you wish proton bindings to be installed into the interpreter specified
locations as was the default in prior releases, please specify -DSYSINSTALL_BINDINGS=ON")
+  set (SYSINSTALL_BINDINGS OFF)
+endif ()
+
+set (BINDING_LANGS PERL PHP PYTHON RUBY)
+
+foreach (LANG ${BINDING_LANGS})
+  set (SYSINSTALL_${LANG} ${SYSINSTALL_BINDINGS} CACHE BOOL "Install ${LANG} bindings into
interpreter specified location.")
+  if (SYSINSTALL_BINDINGS OR SYSINSTALL_${LANG})
+    set (CHECK_SYSINSTALL_${LANG} ON)
+  else ()
+    set (CHECK_SYSINSTALL_${LANG} OFF)
+  endif ()
+endforeach()
 
 if (WIN32)
   set (EXAMPLES_INSTALL_DIR proton/examples)
@@ -98,32 +103,29 @@ 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")
-
 set (PROTON_SHARE ${SHARE_INSTALL_DIR}/proton-${PN_VERSION})
 # End of variables used during install
 
-set (PROTON_JAR_DEPEND_DIR /usr/share/java/ CACHE PATH
-      "When locating compile-time dependencies, the build system searches this location in
addition to the default ones provided by find_jar")
-
 # Pull in local cmake modules
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/tools/cmake/Modules/")
 
-set (java_default ON)
-option(GEN_JAVA "Include java-related artifacts" ${java_default})
-if (GEN_JAVA)
-  find_package( Java )
+if (NOBUILD_JAVA)
+  set (DEFAULT_JAVA OFF)
+else()
+  find_package(Java)
   if (JAVA_FOUND)
-    message(STATUS "Java version: ${Java_VERSION}. javac is at: ${Java_JAVAC_EXECUTABLE}")
-    include(UseJava)
-    include(ProtonUseJava)
-
-    add_subdirectory(proton-j)
+    set (DEFAULT_JAVA ON)
+  else()
+    set (DEFAULT_JAVA OFF)
   endif()
 endif()
 
+option (BUILD_JAVA "Build proton-j." ${DEFAULT_JAVA})
+
+if (BUILD_JAVA)
+  add_subdirectory(proton-j)
+endif()
+
 add_subdirectory(proton-c)
 
 install (FILES LICENSE README TODO
@@ -143,9 +145,10 @@ install (FILES examples/include/pncompat
          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)
+find_program (MAVEN_EXE mvn DOC "Location of the maven program")
+mark_as_advanced (MAVEN_EXE)
+if (JAVA_FOUND AND MAVEN_EXE)
   add_test (proton-java mvn test --file ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml)
-else (JAVA_FOUND AND MAVEN_EXECUTABLE)
+else (JAVA_FOUND AND MAVEN_EXE)
   message (STATUS "Cannot find both Java and Maven: testing disabled for Proton-J")
-endif (JAVA_FOUND AND MAVEN_EXECUTABLE)
+endif (JAVA_FOUND AND MAVEN_EXE)

Modified: qpid/proton/trunk/README
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/README?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/README (original)
+++ qpid/proton/trunk/README Thu Mar 27 17:31:19 2014
@@ -1,3 +1,6 @@
+Proton Project
+==============
+
 Proton is a library for speaking AMQP, including:
 
   + The AMQP Messenger API, a simple but powerful interface to send and receive
@@ -17,199 +20,203 @@ Proton is designed to scale up and down:
 
 Proton is multi-lingual:
 
-  + Proton-C - a C implementation with lanuage bindings in Python,
+  + Proton-C - a C implementation with language bindings in Python,
                Php, Perl, and Ruby
   + Proton-J - a pure Java implementation
 
 Please see http://qpid.apache.org/proton for a more info.
 
-==== Build Instructions ====
-
-Proton has two separate build systems reflecting the nature of its
-two implementations.
+Build Instructions
+==================
 
-   + Proton-C and the language bindings use CMake.
-   + Proton-J uses Maven.
+Proton comes with two separate build systems. The CMake build system
+builds the entire codebase including the C implementation, all the
+bindings of the C implementation, and the pure Java implementation.
 
-The two build systems are independent of one and other, that is,
-Proton-C may be built independently of Proton-J, and vice-versa.
+The maven build system builds only the Java portions of the code.
+Developers wishing to work across multiple languages should become
+familiar with the cmake build system as this will build and run all
+available tests and code whereas the maven build system only runs Java
+tests.
 
-=== Proton-C ===
+CMake (Linux)
+-------------
 
-== Build Instructions (Linux) ==
+The following prerequisites are required to do a full build. If you do
+not wish to build a given language binding you can omit the devel
+package for that language:
 
-The following prerequesuites are required to do a full build. If you
-do not wish to build a given language binding you can omit the package
-for that language:
+    # required dependencies
+    yum install gcc cmake libuuid-devel
 
-  # required dependencies
-  yum install gcc cmake libuuid-devel
+    # dependencies needed for ssl support
+    yum install openssl-devel
 
-  # dependencies needed for ssl support
-  yum install openssl-devel
+    # dependencies needed for bindings
+    yum install swig python-devel ruby-devel php-devel perl-devel
 
-  # dependencies needed for bindings
-  yum install swig python-devel ruby-devel php-devel perl-devel \
-              java-1.6.0-openjdk
+    # dependencies needed for java
+    yum install java-1.6.0-openjdk
 
-  # dependencies needed for python docs
-  yum install epydoc
+    # dependencies needed for python docs
+    yum install epydoc
 
 From the directory where you found this README file:
 
-  mkdir build
-  cd build
-
-  # Set the install prefix. You may need to adjust depending on your
-  # system.
-  cmake -DCMAKE_INSTALL_PREFIX=/usr ..
-
-  # Omit the docs target if you do not wish to build or install
-  # documentation.
-  make all docs
-
-  # Note that this step will require root privileges.
-  make install
-
-Note that all installed files are stored in the install_manifest.txt
-file.
-
-NOTE: The CMAKE_INSTALL_PREFIX does not affect the location for where the language
-bindings (Ruby, Perl, PHP, Ruby) are installed. For those elements, the location is
-determined by the language itself; i.e., each one is interrogated for the proper
-location for extensions.
+    mkdir build
+    cd build
 
-NOTE: If you want to constrain where the Proton code is installed, you have to use
-the DESTDIR argument to make:
+    # Set the install prefix. You may need to adjust depending on your
+    # system.
+    cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DSYSINSTALL_BINDINGS=ON
 
-  make install DESTDIR=[location]
+    # Omit the docs target if you do not wish to build or install
+    # documentation.
+    make all docs
 
-This will install all components (including the language bindings) in locations
-relative to the specified location. So, for example, if the Perl language bindings
-would normally install to /usr/lib/perl5/vendor_perl/ then, if you use:
+    # Note that this step will require root privileges.
+    make install
 
-  make install DESTDIR=/opt
+When make install completes, all installed files are listed in the
+install_manifest.txt file. The contents of this file may be used to
+uninstall.
 
-the bindings would install to /opt/usr/lib/perl5/vendor_perl/ instead.
+Note: When SYSINSTALL_BINDINGS is enabled (ON), the
+CMAKE_INSTALL_PREFIX does not affect the location for where the
+language bindings (Python, Perl, PHP, Ruby) are installed. For those
+elements, the location is determined by the language interpreter
+itself; i.e., each interpreter is queried for the proper location for
+extensions. If you want to constrain where the Proton code is
+installed, set SYSINSTALL_BINDINGS to OFF. This will install all
+bindings to a common location under ${CMAKE_INSTALL_PREFIX}. When
+installed like this, each user will need to manually configure their
+interpreters with the respective binding location.
 
-NOTE: The paths in libqpid-proton.pc are not updated if, when installing, DESTDIR
-is used. The contents of that file are based on the values provided when the
-CMake environment was created.
+Installing Language Bindings
+----------------------------
 
-For more on the use of DESTDIR, see the following:
+Most dynamic languages provide a way for asking where to install
+libraries in order to place them in a default search path.
 
-http://www.gnu.org/prep/standards/html_node/DESTDIR.html
+When SYSINSTALL_BINDINGS is disabled (OFF), Proton installs all
+dynamic language bindings into a central, default location:
 
-== Specifying The Language Binding Install Directories ==
+    BINDINGS=${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/proton/bindings
 
-Most dynamic languages provide a way for asking where to install libraries in
-order to place them in a default search path.
+In order to use these bindings, you'll need to configure your
+interpreter to load the bindings from the appropriate directory:
 
-By default, Proton installs all dynamic language bindings into a central,
-default location:
+ * Perl   - Add ${BINDINGS}/perl to PERL5PATH
+ * PHP    - Set the PHPRC environment variable to point to
+            ${BINDINGS}/php/ini/php.ini
+ * Python - Add ${BINDINGS}/python to PYTHONPATH
+ * Ruby   - Add ${BINDINGS}/ruby to RUBYLIB
 
-  $CMAKE_INSTALL_PREFIX/bindings/$LANG
+You can configure the build to install a specific binding to the
+location specified by the system interpreter with the
+SYSINSTALL_[LANGUAGE] options, where [LANGUAGE] is one of JAVA, PERL,
+PHP, PYTHON, or RUBY.:
 
-In order to use these bindings, you'll need to modify any environment variable
-to include the appropriate directories. The environment variables to be set are:
+    cmake .. -DSYSINSTALL_PHP=ON
 
- * Perl   - Add the bindings/perl and bindings/perl/lib path to PERL5PATH
- * PHP    - Set the PHPRC variable to point to bindings/php/ini/php.ini
- * Python - Add the bindings/python path to PYTHONPATH
- * Ruby   - Add the bindings/ruby and bindings/ruby/lib path to RUBYLIB
+Disabling Language Bindings
+---------------------------
 
-You can tell any single language to install to the correct path for that
-language with:
+To disable any given language bindings, you can use the
+BUILD_[LANGUAGE] option where [LANGUAGE] is one of JAVA, PERL, PHP,
+PYTHON or RUBY, e.g.:
 
-  cmake -DASK_[LANGUAGE]=1 .
+    cmake .. -DBUILD_PHP=OFF
 
-where [LANGUAGE] is one of: PERL, PHP, PYTHON or RUBY. To tell the build system
-to ask ALL languages, use:
+CMake (Windows)
+---------------
 
-  cmake -DASK_ALL=1 .
+This describes how to build the Proton library on Windows using
+Microsoft Visual C++.
 
-== Disable Building The Language Bindings ==
+The Proton build uses the cmake tool to generate the Visual Studio
+project files. These project files can then be loaded into Visual
+Studio and used to build the Proton library.
 
-To disable any language bindings, you can disable them individually with:
+These instructions assume use of a command shell. If you use the
+Visual Studio supplied Command Prompt, cmake is even more likely to
+guess the intended compiler.
 
-  cmake -DBUILD_[LANGUAGE]=OFF .
-
-where [LANGUAGE] is one of JAVA, PERL, PHP, PYTHON or RUBY. To disable building all
-language bindings then include a separate argument for each.
+The following packages must be installed:
 
-== Build Instructions (Windows) ==
+  - Visual Studio 2005 or newer (regular or C++ Express)
+  - Python (www.python.org)
+  - Cmake (www.cmake.org)
 
-This describes how to build the Proton library on Windows using Microsoft
-Visual C++.
+The following packages are optionally required in order to run the
+python or java driven test suites:
 
-The Proton build uses the cmake tool to generate the Visual Studio project
-files.  These project files can then be loaded into Visual Studio and used to
-build the Proton library.
+  - swig (www.swig.org)
 
-These instructions assume use of a command shell.  If you use the Visual
-Studio supplied Command Prompt, cmake is even more likely to guess the
-intended compiler.
+Notes:
 
-The following packages must be installed:
+  - be sure to install relevant Microsoft Service Packs and updates
+  - python.exe _must_ be in your path
+  - cmake.exe _must_ be in your path
+  - swig.exe optional (but should be in your path for building test
+    modules)
 
-    Visual Studio 2005 or newer (regular or C++ Express)
-    Python (www.python.org)
-    Cmake (www.cmake.org)
+### Step 1:
 
-Optional: to run the python or java driven test suites
+Create a 'build' directory - this must be at the same level as the
+'proton-c' directory. For example, from the directory where you found
+this README file:
 
-    swig (www.swig.org)
+    > mkdir build
 
-    Notes:
-        - Be sure to install relevant Microsoft Service Packs and updates
-        - python.exe _must_ be in your path
-        - cmake.exe _must_ be in your path
-        - swig.exe optional (but should be in your path for building test modules)
+### Step 2:
 
+  cd into the build directory
 
-Step 1: Create a 'build' directory - this must be at the same level as the
-        'proton-c' directory.  Example:
+    > cd build
 
-     From the directory where you found this README file:
-     > mkdir build
+### Step 3:
 
-Step 2: cd into the build directory
+Generate the Visual Studio project files using cmake. The command
+contains:
 
-     > cd build
+  1. the name of the compiler you are using (if cmake guesses wrongly)
+  2. the path (required) to the _directory_ that contains the top
+     level "CMakeLists.txt" file (the parent directory, in this case).
 
-Step 3: Generate the Visual Studio project files using cmake.  The command contains
+  Example:
 
-        1) the name of the compiler you are using (if cmake guesses wrongly)
-        2) the path (required) to the _directory_ that contains the top level
-           "CMakeLists.txt" file (the parent directory, in this case).
-     Example:
+    > cmake ..
 
-     > cmake ..
+  If cmake doesn't guess things correctly, useful additional arguments
+  are:
 
-     If cmake doesn't guess things correctly, useful additional arguments are:
+    -G "Visual Studio 10"
+    -DSWIG_EXECUTABLE=C:\swigwin-2.0.7\swig.exe
 
-        -G "Visual Studio 10"
-        -DSWIG_EXECUTABLE=C:\swigwin-2.0.7\swig.exe
+  Refer to the cmake documentation for more information.
 
-     Refer to the cmake documentation for more information.
+### Step 4:
 
-Step 4: Load the ALL_BUILD project into Visual Studio
+Load the ALL_BUILD project into Visual Studio
 
-     4a: Run the Microsoft Visual Studio IDE
-     4b: From within the IDE, open the ALL_BUILD project file or proton solution
-         file - it should be in the 'build' directory you created above.
-     4c: select the appropriate configuration.  RelWithDebInfo works best with
-         the included CMake/CTest scripts
+  a. Run the Microsoft Visual Studio IDE
+  b. From within the IDE, open the ALL_BUILD project file or proton
+     solution file - it should be in the 'build' directory you created
+     above.
+  c. select the appropriate configuration. RelWithDebInfo works best
+     with the included CMake/CTest scripts
 
-Step 5: Build the ALL_BUILD project.
+### Step 5:
 
-Note that if you wish to build debug version of proton for use with swig
-bindings on Windows, you must have the appropriate debug target libraries to
-link against.
+Build the ALL_BUILD project.
 
-=== Proton-J ===
+Note that if you wish to build debug version of proton for use with
+swig bindings on Windows, you must have the appropriate debug target
+libraries to link against.
 
-== Build Instructions (All platforms) ==
+Maven (All platforms)
+---------------------
 
 The following prerequesuites are required to do a full build.
 
@@ -217,39 +224,31 @@ The following prerequesuites are require
 
 From the directory where you found this README file:
 
-  # To compile and package all Java modules (omitting the tests)
-  mvn -DskipTests package
-
-  # To install the packages in the local Maven repository (usually ~/.m2/repo)
-  mvn -DskipTests install
-
-=== Testing ===
-
-To test Proton, run the system tests (located in the tests subdirectory).
-The system tests are applicable to both the Proton-C and Proton-J
-implementations.
+    # To compile and package all Java modules (omitting the tests)
+    mvn -DskipTests package
 
-== Test Instructions ==
+    # To install the packages in the local Maven repository (usually ~/.m2/repo)
+    mvn -DskipTests install
 
-To run the system tests using the CMake build system, from your build
-directory above:
+Testing
+=======
 
-   # to run all the tests, summary mode
-   ctest
+Additional packages required for testing:
 
-   # to run a single test, full output
-   ctest -V -R proton-c
+    yum install rubygem-minitest
 
-== Test Instructions (Proton-J only) ==
+To test Proton, use the cmake build and run 'make test'. Note that
+this will invoke the maven tests as well, so the maven prerequisates
+are required in addition to the cmake prerequisites.
 
-To run the java system tests, run:
+Running Tests
+-------------
 
-  # To test Proton-J
-  mvn test
+To run the system tests using the CMake build system, cd into your
+build directory and use the following commands:
 
-  # To produce a nicely formated report containing the test results
-  # (in tests/target/site/surefire-report.html)
-  mvn surefire-report:report
+    # to run all the tests, summary mode
+    ctest
 
-Note that if Java is built, these tests will be automatically run from
-the CMake build.
+    # to run a single test, full output
+    ctest -V -R proton-c

Modified: qpid/proton/trunk/examples/messenger/c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/c/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/c/CMakeLists.txt (original)
+++ qpid/proton/trunk/examples/messenger/c/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -17,24 +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)
+find_package(Proton REQUIRED)
 
 add_executable(recv recv.c)
 add_executable(send send.c)
 
-target_link_libraries(recv qpid-proton)
-target_link_libraries(send qpid-proton)
-
-set_target_properties (
-  recv send
-  PROPERTIES
-  COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_LANGUAGE_FLAGS}"
-)
+include_directories(${Proton_INCLUDE_DIRS})
 
-if (BUILD_WITH_CXX)
-  set_source_files_properties (recv.c send.c PROPERTIES LANGUAGE CXX)
-endif (BUILD_WITH_CXX)
+target_link_libraries(recv ${Proton_LIBRARIES})
+target_link_libraries(send ${Proton_LIBRARIES})

Modified: qpid/proton/trunk/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -51,6 +51,7 @@ if (OPENSSL_FOUND)
   set(ssl_impl openssl)
 endif(OPENSSL_FOUND)
 set(SSL_IMPL ${ssl_impl} CACHE STRING "Library to use for SSL/TLS support. Valid values:
'none','openssl'")
+mark_as_advanced (SSL_IMPL)
 
 configure_file (
   "${CMAKE_CURRENT_SOURCE_DIR}/include/proton/version.h.in"
@@ -229,7 +230,6 @@ endif (SWIG_FOUND)
 
 add_subdirectory(docs/api)
 add_subdirectory(docs/man)
-add_subdirectory(../examples/messenger/c examples/messenger/c)
 add_subdirectory(../tests/tools/apps/c ../tests/tools/apps/c)
 
 set (qpid-proton-platform
@@ -431,16 +431,18 @@ endif (CMAKE_SYSTEM_NAME STREQUAL Window
 
 set (env_py "${CMAKE_CURRENT_SOURCE_DIR}/env.py" )
 
-find_program(VALGRIND valgrind DOC "Location of the valgrind program")
+find_program(VALGRIND_EXE valgrind DOC "Location of the valgrind program")
 option(ENABLE_VALGRIND "Use valgrind to detect run-time problems" ON)
 if (ENABLE_VALGRIND)
-  if (VALGRIND STREQUAL VALGRIND-NOTFOUND)
+  if (NOT VALGRIND_EXE)
     message(STATUS "Can't locate the valgrind command; no run-time error detection")
-  else (VALGRIND STREQUAL VALGRIND-NOTFOUND)
-    set (VALGRIND_ENV "VALGRIND=${VALGRIND}")
-  endif (VALGRIND STREQUAL VALGRIND-NOTFOUND)
+  else ()
+    set (VALGRIND_ENV "VALGRIND=${VALGRIND_EXE}")
+  endif ()
 endif (ENABLE_VALGRIND)
 
+mark_as_advanced (VALGRIND_EXE)
+
 # c tests:
 
 add_subdirectory(src/tests)
@@ -462,8 +464,8 @@ add_test (python-test ${PYTHON_EXECUTABL
          ${PYTHON_EXECUTABLE} "${py_root}/proton-test")
 set_tests_properties(python-test PROPERTIES PASS_REGULAR_EXPRESSION "Totals: .* 0 failed")
 
-find_program(ruby_exe "ruby")
-if (ruby_exe)
+find_program(RUBY_EXE "ruby")
+if (RUBY_EXE)
   set (rb_root "${pn_test_root}/ruby")
   set (rb_src "${CMAKE_CURRENT_SOURCE_DIR}/bindings/ruby")
   set (rb_lib "${CMAKE_CURRENT_SOURCE_DIR}/bindings/ruby/lib")
@@ -477,16 +479,21 @@ if (ruby_exe)
     "${rb_root}/proton-test")
 
   # ruby spec tests
-  find_program(rspec_exe rspec)
-  if (rspec_exe)
+  find_program(RSPEC_EXE rspec)
+  if (RSPEC_EXE)
     add_test (NAME ruby-spec-test
               WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bindings/ruby
               COMMAND ${PYTHON_EXECUTABLE} ${env_py} "PATH=${rb_path}" "RUBYLIB=${rb_rubylib}"
-                      ${rspec_exe})
+                      ${RSPEC_EXE})
 
-  else(rspec_exe)
+  else(RSPEC_EXE)
     message (STATUS "Cannot find rspec, skipping rspec tests")
-  endif(rspec_exe)
-else (ruby_exe)
+  endif(RSPEC_EXE)
+else (RUBY_EXE)
   message (STATUS "Cannot find ruby, skipping ruby tests")
-endif (ruby_exe)
+endif (RUBY_EXE)
+
+mark_as_advanced (RUBY_EXE RSPEC_EXE)
+
+# build examples to make sure they still work
+add_subdirectory(../examples ../examples)

Modified: qpid/proton/trunk/proton-c/bindings/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -47,10 +47,12 @@ endif (RUBY_FOUND)
 find_program(PHP_CONFIG_EXE php-config)
 if (PHP_CONFIG_EXE)
   find_program(PHP_EXE php)
+  mark_as_advanced (PHP_EXE)
   if (PHP_EXE)
     set (DEFAULT_PHP ON)
   endif (PHP_EXE)
 endif (PHP_CONFIG_EXE)
+mark_as_advanced (PHP_CONFIG_EXE)
 
 # Prerequisites for Perl:
 include(FindPerl)

Modified: qpid/proton/trunk/proton-c/bindings/perl/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/perl/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/perl/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/perl/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -23,28 +23,24 @@ include_directories("${PERL_INCLUDE_PATH
 execute_process(COMMAND perl -MConfig -e "print \$Config{ccflags}"
                 OUTPUT_VARIABLE PERLCFLAGS)
 
-if (ASK_PERL)
-
-  execute_process(COMMAND perl -V:installvendorlib
-    OUTPUT_VARIABLE PERL_ARCHLIB_OUTPUT_VARIABLE
-    RESULT_VARIABLE PERL_ARCHLIB_RESULT_VARIABLE)
-  if (NOT PERL_ARCHLIB_RESULT_VARIABLE)
-    string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_VARIABLE})
-    file(TO_CMAKE_PATH "${PERL_ARCHLIB}" PERL_ARCHLIB_DIR)
-  endif (NOT PERL_ARCHLIB_RESULT_VARIABLE)
-
-  execute_process(COMMAND perl -V:installsitelib
-    OUTPUT_VARIABLE PERL_SITELIB_OUTPUT_VARIABLE
-    RESULT_VARIABLE PERL_SITELIB_RESULT_VARIABLE)
-  if (NOT PERL_SITELIB_RESULT_VARIABLE)
-    string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_SITELIB ${PERL_SITELIB_OUTPUT_VARIABLE})
-    file(TO_CMAKE_PATH "${PERL_SITELIB}" PERL_SITELIB_DIR)
-  endif (NOT PERL_SITELIB_RESULT_VARIABLE)
-
-else (ASK_PERL)
-  set (PERL_ARCHLIB_DIR ${BINDINGS_DIR}/perl/lib${LIB_SUFFIX} CACHE PATH "Perl platform code")
-  set (PERL_SITELIB_DIR ${BINDINGS_DIR}/perl/ CACHE PATH "Perl code")
-endif (ASK_PERL)
+if (CHECK_SYSINSTALL_PERL)
+  execute_process(COMMAND perl -V:installvendorarch
+    OUTPUT_VARIABLE PERL_VENDORARCH_OUTPUT_VARIABLE
+    RESULT_VARIABLE PERL_VENDORARCH_RESULT_VARIABLE)
+
+  if (NOT PERL_VENDORARCH_RESULT_VARIABLE)
+    string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORARCH ${PERL_VENDORARCH_OUTPUT_VARIABLE})
+    file(TO_CMAKE_PATH "${PERL_VENDORARCH}" PERL_VENDORARCH_DIR_DEFAULT)
+  else ()
+    set (PERL_VENDORARCH_DIR_DEFAULT ${PERL_VENDORARCH_RESULT_VARIABLE})
+  endif ()
+else (CHECK_SYSINSTALL_PERL)
+  set (PERL_VENDORARCH_DIR_DEFAULT ${BINDINGS_DIR}/perl)
+endif (CHECK_SYSINSTALL_PERL)
+
+if (NOT PERL_VENDORARCH_DIR)
+  set (PERL_VENDORARCH_DIR ${PERL_VENDORARCH_DIR_DEFAULT})
+endif()
 
 set (CMAKE_C_FLAGS ${PERLCFLAGS})
 
@@ -53,32 +49,25 @@ swig_link_libraries(cproton_perl ${BINDI
 
 if ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8))
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.so
-        DESTINATION ${PERL_ARCHLIB_DIR}
-        COMPONENT ${QPID_COMPONENT_CLIENT}
+        DESTINATION ${PERL_VENDORARCH_DIR}
+        COMPONENT Perl
         )
 else()
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcproton_perl.so
         RENAME cproton_perl.so
-        DESTINATION ${PERL_ARCHLIB_DIR}
-        COMPONENT ${QPID_COMPONENT_CLIENT}
+        DESTINATION ${PERL_VENDORARCH_DIR}
+        COMPONENT Perl
         )
 endif ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8))
 
-# get the perl vendor library if it's not already defined
-#if (NOT PERL_ARCHLIB)
-#  execute_process(COMMAND ${PERL_EXECUTABLE} "-V:installvendorlib"
-#                  OUTPUT_VARIABLE PERL_ARCHLIB_OUTPUT_VARIABLE
-#                  RESULT_VARIABLE PERL_ARCHLIB_RESULT_VARIABLE)
-#endif (!DEFINED PERL_ARCHLIB)
-
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.pm
-        DESTINATION ${PERL_ARCHLIB_DIR}
+        DESTINATION ${PERL_VENDORARCH_DIR}
         COMPONENT Perl)
 
 install(FILES lib/qpid_proton.pm
-        DESTINATION ${PERL_SITELIB_DIR}
+        DESTINATION ${PERL_VENDORARCH_DIR}
         COMPONENT Perl)
 
 INSTALL(DIRECTORY lib/qpid
-        DESTINATION ${PERL_SITELIB_DIR}
+        DESTINATION ${PERL_VENDORARCH_DIR}
         COMPONENT Perl)

Modified: qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -39,7 +39,7 @@ set_target_properties(cproton
     PREFIX ""
     LINK_FLAGS "${ALLOW_UNDEFINED}")
 
-if (ASK_PHP)
+if (CHECK_SYSINSTALL_PHP)
   execute_process(COMMAND ${PHP_CONFIG_EXE} --extension-dir
     OUTPUT_VARIABLE PHP_EXT_DIR_DEFAULT
     OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -65,18 +65,24 @@ if (ASK_PHP)
   if ("${PHP_INI_DIR_DEFAULT}" STREQUAL "")
     set(PHP_INI_DIR_DEFAULT "/etc/php.d")
   endif()
-
-  set(PHP_EXT_DIR ${PHP_EXT_DIR_DEFAULT} CACHE PATH "PHP extensions directory.")
-  set(PHP_INI_DIR ${PHP_INI_DIR_DEFAULT} CACHE PATH "Directory scanned for PHP ini files.")
-  set(PHP_INCLUDE_DIR ${PHP_INCLUDE_DIR_DEFAULT} CACHE PATH "PHP include directory.")
-
-else (ASK_PHP)
-
-  set (PHP_EXT_DIR ${BINDINGS_DIR}/php CACHE PATH "PHP extensions directory")
-  set (PHP_INCLUDE_DIR ${BINDINGS_DIR}/php/include CACHE PATH "PHP include directory")
-  set (PHP_INI_DIR ${BINDINGS_DIR}/php/ini CACHE PATH "PHP ini directory")
-
-endif (ASK_PHP)
+else (CHECK_SYSINSTALL_PHP)
+  set (PHP_EXT_DIR_DEFAULT ${BINDINGS_DIR}/php)
+  set (PHP_INI_DIR_DEFAULT ${BINDINGS_DIR}/php/ini)
+  set (PHP_INCLUDE_DIR_DEFAULT ${BINDINGS_DIR}/php/include)
+endif (CHECK_SYSINSTALL_PHP)
+
+# PHP extensions directory
+if (NOT PHP_EXT_DIR)
+  set (PHP_EXT_DIR ${PHP_EXT_DIR_DEFAULT})
+endif()
+# PHP ini directory
+if (NOT PHP_INI_DIR)
+  set (PHP_INI_DIR ${PHP_INI_DIR_DEFAULT})
+endif()
+# PHP include directory
+if (NOT PHP_INCLUDE_DIR)
+  set (PHP_INCLUDE_DIR ${PHP_INCLUDE_DIR_DEFAULT})
+endif()
 
 install(TARGETS cproton
         DESTINATION ${PHP_EXT_DIR}

Modified: qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -30,19 +30,18 @@ set_target_properties(_cproton
 
 find_package(PythonInterp REQUIRED)
 
-if (ASK_PYTHON)
-
-  if (NOT PYTHON_SITEARCH_PACKAGES)
-    execute_process(COMMAND ${PYTHON_EXECUTABLE}
-      -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)"
-      OUTPUT_VARIABLE PYTHON_ARCHLIB_DIR
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-  else (NOT PYTHON_SITEARCH_PACKAGES)
-    set (PYTHON_ARCHLIB_DIR "${PYTHON_SITEARCH_PACKAGES}")
-  endif ()
-else (ASK_PYTHON)
-  set (PYTHON_ARCHLIB_DIR ${BINDINGS_DIR}/python/lib${LIB_SUFFIX} CACHE PATH "Python platform
code")
-endif (ASK_PYTHON)
+if (CHECK_SYSINSTALL_PYTHON)
+  execute_process(COMMAND ${PYTHON_EXECUTABLE}
+    -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)"
+    OUTPUT_VARIABLE PYTHON_SITEARCH_PACKAGES_DEFAULT
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+else ()
+  set (PYTHON_SITEARCH_PACKAGES_DEFAULT ${BINDINGS_DIR}/python/lib${LIB_SUFFIX})
+endif ()
+
+if (NOT PYTHON_SITEARCH_PACKAGES)
+  set (PYTHON_SITEARCH_PACKAGES ${PYTHON_SITEARCH_PACKAGES_DEFAULT})
+endif()
 
 install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cproton.py
                               WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
@@ -54,6 +53,7 @@ install(CODE "execute_process(COMMAND ${
                               WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})")
 
 find_program(EPYDOC_EXE epydoc)
+mark_as_advanced (EPYDOC_EXE)
 if (EPYDOC_EXE)
    add_custom_target(docs-py COMMAND ${EPYDOC_EXE} -v --no-private --html
                      -o ${CMAKE_CURRENT_BINARY_DIR}/html
@@ -71,8 +71,8 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR
               ${CMAKE_CURRENT_SOURCE_DIR}/proton.py
               ${CMAKE_CURRENT_SOURCE_DIR}/proton.pyc
               ${CMAKE_CURRENT_SOURCE_DIR}/proton.pyo
-        DESTINATION ${PYTHON_ARCHLIB_DIR}
+        DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT Python)
 install(TARGETS _cproton
-        DESTINATION ${PYTHON_ARCHLIB_DIR}
+        DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT Python)

Modified: qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -26,8 +26,7 @@ set_target_properties(cproton-ruby
     OUTPUT_NAME "cproton"
     LINK_FLAGS "${CATCH_UNDEFINED}" )
 
-if (ASK_RUBY)
-
+if (CHECK_SYSINSTALL_RUBY)
   execute_process(COMMAND ${RUBY_EXECUTABLE}
     -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir'] || ''"
     RESULT_VARIABLE RESULT_RUBY_ARCHLIB_DIR
@@ -38,18 +37,16 @@ if (ASK_RUBY)
       -r rbconfig -e "print RbConfig::CONFIG['archdir'] || ''"
       RESULT_VARIABLE RESULT_RUBY_ARCHLIB_DIR
       OUTPUT_VARIABLE OUTPUT_RUBY_ARCHLIB_DIR)
-
   endif()
 
-  set(RUBY_ARCHLIB_DIR "${OUTPUT_RUBY_ARCHLIB_DIR}")
-
-else (ASK_RUBY)
-
-  set (RUBY_SITELIB_DIR ${BINDINGS_DIR}/ruby CACHE PATH "Ruby portable code")
-  set (RUBY_ARCHLIB_DIR ${BINDINGS_DIR}/ruby/lib${LIB_SUFFIX} CACHE PATH "Ruby platform code")
-
-endif (ASK_RUBY)
-
+  set(RUBY_ARCHLIB_DIR_DEFAULT "${OUTPUT_RUBY_ARCHLIB_DIR}")
+else (CHECK_SYSINSTALL_RUBY)
+  set (RUBY_ARCHLIB_DIR_DEFAULT ${BINDINGS_DIR}/ruby/lib${LIB_SUFFIX})
+endif (CHECK_SYSINSTALL_RUBY)
+
+if (NOT RUBY_ARCHLIB_DIR)
+  set (RUBY_ARCHLIB_DIR ${RUBY_ARCHLIB_DIR_DEFAULT})
+endif()
 
 install(TARGETS cproton-ruby
         DESTINATION ${RUBY_ARCHLIB_DIR}

Modified: qpid/proton/trunk/proton-c/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/tests/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/tests/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/src/tests/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -19,10 +19,10 @@
 
 add_definitions(${COMPILE_WARNING_FLAGS} ${COMPILE_PLATFORM_FLAGS})
 
-if (ENABLE_VALGRIND AND VALGRIND)
-  set(memcheck-cmd ${VALGRIND} --error-exitcode=1 --quiet
+if (ENABLE_VALGRIND AND VALGRIND_EXE)
+  set(memcheck-cmd ${VALGRIND_EXE} --error-exitcode=1 --quiet
                    --leak-check=full --trace-children=yes)
-endif (ENABLE_VALGRIND AND VALGRIND)
+endif ()
 
 macro (pn_add_c_test test file)
   add_executable (${test} ${file})

Modified: qpid/proton/trunk/proton-j/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-j/CMakeLists.txt?rev=1582416&r1=1582415&r2=1582416&view=diff
==============================================================================
--- qpid/proton/trunk/proton-j/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-j/CMakeLists.txt Thu Mar 27 17:31:19 2014
@@ -17,8 +17,12 @@
 # under the License.
 #
 
+include(UseJava)
+include(ProtonUseJava)
 set(CMAKE_JAVA_TARGET_VERSION ${PN_VERSION})
 file(GLOB_RECURSE SOURCES_ABS "src/main/java/*.java")
 add_jar(proton-j ${SOURCES_ABS})
 rebuild_jar(proton-j proton-j-${PN_VERSION}.jar)
+set (JAVA_INSTALL_DIR ${SHARE_INSTALL_DIR}/java CACHE PATH "Installation directory for all
JARs except those using JNI")
+mark_as_advanced (JAVA_INSTALL_DIR)
 install_jar(proton-j ${JAVA_INSTALL_DIR})



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


Mime
View raw message