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

svn commit: r1371803 - in /qpid/proton/branches/driver_abstraction: ./ proton-c/bindings/CMakeLists.txt proton-c/bindings/php/CMakeLists.txt proton-c/bindings/php/cproton.ini proton-c/bindings/php/get_include_dir.php

Author: kgiusti
Date: Fri Aug 10 18:26:07 2012
New Revision: 1371803

URL: http://svn.apache.org/viewvc?rev=1371803&view=rev
Log:
NO-JIRA: merge in latest trunk.

Added:
    qpid/proton/branches/driver_abstraction/proton-c/bindings/php/cproton.ini
      - copied unchanged from r1371802, qpid/proton/trunk/proton-c/bindings/php/cproton.ini
    qpid/proton/branches/driver_abstraction/proton-c/bindings/php/get_include_dir.php
      - copied unchanged from r1371802, qpid/proton/trunk/proton-c/bindings/php/get_include_dir.php
Modified:
    qpid/proton/branches/driver_abstraction/   (props changed)
    qpid/proton/branches/driver_abstraction/proton-c/bindings/CMakeLists.txt
    qpid/proton/branches/driver_abstraction/proton-c/bindings/php/CMakeLists.txt

Propchange: qpid/proton/branches/driver_abstraction/
------------------------------------------------------------------------------
  Merged /qpid/proton/trunk:r1368119-1371802

Modified: qpid/proton/branches/driver_abstraction/proton-c/bindings/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/bindings/CMakeLists.txt?rev=1371803&r1=1371802&r2=1371803&view=diff
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/bindings/CMakeLists.txt (original)
+++ qpid/proton/branches/driver_abstraction/proton-c/bindings/CMakeLists.txt Fri Aug 10 18:26:07 2012
@@ -38,5 +38,8 @@ endif (RUBY_FOUND)
 # @todo: allow user to specify which php-config if multiple PHP sources installed!
 find_program(PHP_CONFIG_EXE php-config)
 if (PHP_CONFIG_EXE)
-  add_subdirectory(php)
+  find_program(PHP_EXE php)
+  if (PHP_EXE)
+    add_subdirectory(php)
+  endif (PHP_EXE)
 endif (PHP_CONFIG_EXE)

Modified: qpid/proton/branches/driver_abstraction/proton-c/bindings/php/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/branches/driver_abstraction/proton-c/bindings/php/CMakeLists.txt?rev=1371803&r1=1371802&r2=1371803&view=diff
==============================================================================
--- qpid/proton/branches/driver_abstraction/proton-c/bindings/php/CMakeLists.txt (original)
+++ qpid/proton/branches/driver_abstraction/proton-c/bindings/php/CMakeLists.txt Fri Aug 10 18:26:07 2012
@@ -42,9 +42,33 @@ execute_process(COMMAND ${PHP_CONFIG_EXE
 execute_process(COMMAND ${PHP_CONFIG_EXE} --prefix
                 OUTPUT_VARIABLE PHP_PFX
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND ${PHP_CONFIG_EXE} --config-options
+                OUTPUT_VARIABLE PHP_OPTS
+                OUTPUT_STRIP_TRAILING_WHITESPACE)
 
 string(REPLACE ${PHP_PFX} ${CMAKE_INSTALL_PREFIX} PHP_REL_EXT_DIR ${PHP_EXT_DIR})
 
+set(GET_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/get_include_dir.php)
+execute_process(COMMAND ${PHP_EXE} ${GET_INCLUDE_DIR} ${PHP_PFX}
+                OUTPUT_VARIABLE PHP_INCLUDE_DIR
+                OUTPUT_STRIP_TRAILING_WHITESPACE)
+string(REPLACE ${PHP_PFX} ${CMAKE_INSTALL_PREFIX} 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 (NOT ${PHP_REL_EXT_DIR} STREQUAL ${PHP_EXT_DIR})
+  set (PHP_INI_SCAN_DIR "${CMAKE_INSTALL_PREFIX}${PHP_INI_SCAN_DIR}")
+endif ()
+
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.so
         DESTINATION ${PHP_REL_EXT_DIR}
         COMPONENT PHP)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.php
+        DESTINATION ${PHP_REL_INCLUDE_DIR}
+        COMPONENT PHP)
+
+if (NOT ${PHP_INI_SCAN_DIR} STREQUAL "")
+  install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cproton.ini
+          DESTINATION ${PHP_INI_SCAN_DIR}
+          COMPONENT PHP)
+endif ()



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