You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2012/10/23 19:13:56 UTC

svn commit: r1401350 - in /qpid/proton/trunk/proton-c: CMakeLists.txt README bindings/php/CMakeLists.txt bindings/python/CMakeLists.txt docs/api/CMakeLists.txt

Author: rhs
Date: Tue Oct 23 17:13:55 2012
New Revision: 1401350

URL: http://svn.apache.org/viewvc?rev=1401350&view=rev
Log:
added support for LIB_SUFFIX and autodetection thereof; added python docs to the build; updated README

Modified:
    qpid/proton/trunk/proton-c/CMakeLists.txt
    qpid/proton/trunk/proton-c/README
    qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt
    qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt
    qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt

Modified: qpid/proton/trunk/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/CMakeLists.txt?rev=1401350&r1=1401349&r2=1401350&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/CMakeLists.txt Tue Oct 23 17:13:55 2012
@@ -15,13 +15,24 @@ set (PN_VERSION "${PN_VERSION_MAJOR}.${P
 # So make these cached variables and the specific variables non cached
 # and derived from them.
 
+if (NOT DEFINED LIB_SUFFIX)
+    get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
+    if (${LIB64} STREQUAL "TRUE")
+        set(LIB_SUFFIX 64)
+    else()
+        set(LIB_SUFFIX "")
+    endif()
+endif()
+
 set (INCLUDE_INSTALL_DIR include CACHE PATH "Include file directory")
-set (LIB_INSTALL_DIR lib CACHE PATH "Library object file directory")
+set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Library object file directory")
 set (SYSCONF_INSTALL_DIR etc CACHE PATH "System read only configuration directory")
 set (SHARE_INSTALL_DIR share CACHE PATH "Shared read only data directory")
 
 set (PROTON_SHARE ${SHARE_INSTALL_DIR}/proton)
 
+add_custom_target(docs)
+
 # Set the default SSL/TLS implementation
 find_package(OpenSSL)
 
@@ -134,4 +145,3 @@ configure_file(${PROJECT_SOURCE_DIR}/src
          ${PROJECT_BINARY_DIR}/libqpid-proton.pc @ONLY)
 install (FILES ${PROJECT_BINARY_DIR}/libqpid-proton.pc
          DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-

Modified: qpid/proton/trunk/proton-c/README
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/README?rev=1401350&r1=1401349&r2=1401350&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/README (original)
+++ qpid/proton/trunk/proton-c/README Tue Oct 23 17:13:55 2012
@@ -14,17 +14,18 @@ package for that language:
   # dependencies needed for bindings
   yum install swig python-devel ruby-devel php-devel
 
+  # dependencies needed for python docs
+  yum install epydoc
+
 From the directory where you found this README file:
 
   mkdir build
   cd build
 
-  # Depending on your system you may want to adjust the install prefix
-  # and/or adjust the lib dir.
-  #
-  # cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=lib64 ..
+  # depending on your system you may want to adjust the install prefix
   cmake -DCMAKE_INSTALL_PREFIX=/usr ..
 
-  make install
+  # omit the docs target if you do not wish to install documentation
+  make all docs install
 
 Note that all installed files are stored in the install_manifest.txt file.

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=1401350&r1=1401349&r2=1401350&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt Tue Oct 23 17:13:55 2012
@@ -55,9 +55,9 @@ execute_process(COMMAND ${PHP_EXE} ${GET
 string(REPLACE "${PHP_PFX}/" "" PHP_REL_INCLUDE_DIR ${PHP_INCLUDE_DIR})
 
 string(REGEX MATCH "--with-config-file-scan-dir=([^ ]*)" PHP_OPT_MATCH ${PHP_OPTS})
-set (PHP_INI_SCAN_DIR ${CMAKE_MATCH_1})
-if (IS_ABSOLUTE "${PHP_INI_SCAN_DIR}" AND (NOT (IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})))
-  string(SUBSTRING ${PHP_INI_SCAN_DIR} 1 -1 PHP_INI_SCAN_DIR)
+set (PHP_SCAN_DIR ${CMAKE_MATCH_1})
+if (IS_ABSOLUTE "${PHP_SCAN_DIR}" AND (NOT (IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})))
+  string(SUBSTRING ${PHP_SCAN_DIR} 1 -1 PHP_SCAN_DIR)
 endif ()
 
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.so
@@ -70,8 +70,10 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR
         DESTINATION ${PHP_REL_INCLUDE_DIR}
         COMPONENT PHP)
 
-if (NOT ${PHP_INI_SCAN_DIR} STREQUAL "")
+set (PHP_INI_DIR ${PHP_SCAN_DIR} CACHE PATH "Directory scanned for PHP ini files.")
+
+if (NOT ${PHP_INI_DIR} STREQUAL "")
   install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cproton.ini
-          DESTINATION ${PHP_INI_SCAN_DIR}
+          DESTINATION ${PHP_INI_DIR}
           COMPONENT PHP)
 endif ()

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=1401350&r1=1401349&r2=1401350&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/python/CMakeLists.txt Tue Oct 23 17:13:55 2012
@@ -19,6 +19,16 @@ install(CODE "execute_process(COMMAND ${
                               WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})")
 install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile proton.py
                               WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})")
+
+find_program(EPYDOC_EXE epydoc)
+if (EPYDOC_EXE)
+   add_custom_target(docs-py COMMAND ${EPYDOC_EXE} --no-private --html -o ${CMAKE_CURRENT_BINARY_DIR}/html proton)
+   add_dependencies(docs docs-py)
+   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
+           DESTINATION ${PROTON_SHARE}/docs/api-py
+           COMPONENT documentation)
+endif (EPYDOC_EXE)
+
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.py
               ${CMAKE_CURRENT_BINARY_DIR}/cproton.pyc
               ${CMAKE_CURRENT_BINARY_DIR}/cproton.pyo

Modified: qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt?rev=1401350&r1=1401349&r2=1401350&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/docs/api/CMakeLists.txt Tue Oct 23 17:13:55 2012
@@ -21,13 +21,13 @@ find_package(Doxygen)
 if (DOXYGEN_FOUND)
   configure_file (${CMAKE_CURRENT_SOURCE_DIR}/user.doxygen.in
                   ${CMAKE_CURRENT_BINARY_DIR}/user.doxygen)
-  add_custom_target (docs COMMAND ${DOXYGEN_EXECUTABLE} user.doxygen)
+  add_custom_target (docs-c COMMAND ${DOXYGEN_EXECUTABLE} user.doxygen)
+  add_dependencies (docs docs-c)
 
   # HTML files are generated to ./html - put those in the install.
   install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
-           DESTINATION ${PROTON_SHARE}/docs/api
-           COMPONENT documentation
-           OPTIONAL)
+           DESTINATION ${PROTON_SHARE}/docs/api-c
+           COMPONENT documentation)
   # if (CPACK_GENERATOR STREQUAL "NSIS")
   #     set (CPACK_NSIS_MENU_LINKS
   #          "${QPID_INSTALL_HTMLDIR}/index.html" "Qpid C++ API Documentation"



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