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/12/04 16:53:00 UTC
svn commit: r1547831 -
/qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt
Author: mcpierce
Date: Wed Dec 4 15:52:59 2013
New Revision: 1547831
URL: http://svn.apache.org/r1547831
Log:
Revert "PROTON-445: PHP install now honors the install prefix."
This reverts commit 395e4e3d3892639db126d7d8011c784f5aaae381.
Modified:
qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt
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=1547831&r1=1547830&r2=1547831&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt Wed Dec 4 15:52:59 2013
@@ -58,47 +58,17 @@ if ("${PHP_INCLUDE_DIR_DEFAULT}" STREQUA
set(PHP_INCLUDE_DIR_DEFAULT "/usr/share/php")
endif()
-if (NOT PHP_INSTALL_PREFIX)
- set (PHP_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
-endif (NOT PHP_INSTALL_PREFIX)
-
-execute_process (COMMAND ${PHP_CONFIG_EXE} --prefix
- OUTPUT_VARIABLE PHP_PREFIX
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
string(REGEX MATCH "--with-config-file-scan-dir=([^ ]*)" PHP_OPT_MATCH ${PHP_OPTS})
set (PHP_INI_DIR_DEFAULT ${CMAKE_MATCH_1})
if ("${PHP_INI_DIR_DEFAULT}" STREQUAL "")
- set(PHP_INI_DIR_DEFAULT ${PHP_PREFIX}/etc/php.d)
-endif()
-
-# if not installing to the system directory, then update the prefix to the ini directory
-if (NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")
- set(PHP_INI_DIR_DEFAULT ${PHP_INSTALL_PREFIX}/${PHP_INI_DIR_DEFAULT})
+ set(PHP_INI_DIR_DEFAULT "/etc/php.d")
endif()
-MESSAGE(STATUS "PHP_INI_DIR_DEFAULT=${PHP_INI_DIR_DEFAULT}")
-
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.")
-macro(replace_prefix prefix new_prefix source varname)
- MESSAGE(STATUS "1:${${varname}}=${varname}")
- string(REGEX REPLACE
- "(.*)${${prefix}}(.*)"
- "\\1${${new_prefix}}\\2"
- ${varname}
- "${${source}}")
-
- MESSAGE(STATUS "2:${${varname}}=${varname}")
-endmacro()
-
-replace_prefix(PHP_PREFIX PHP_INSTALL_PREFIX PHP_EXT_DIR PHP_EXT_DIR)
-replace_prefix(PHP_PREFIX PHP_INSTALL_PREFIX PHP_INI_DIR PHP_INI_DIR)
-replace_prefix(PHP_PREFIX PHP_INSTALL_PREFIX PHP_INCLUDE_DIR PHP_INCLUDE_DIR)
-
install(TARGETS cproton
DESTINATION ${PHP_EXT_DIR}
COMPONENT PHP)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org