summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas B <roundcube@gmail.com>2012-04-21 16:45:48 (GMT)
committerThomas B <roundcube@gmail.com>2012-04-21 16:45:48 (GMT)
commitad79c1c7b9edb7db9118dade42c301f0e753df28 (patch)
tree93700868fc5d18196be2cb4892e0f96ba4742c70
parent13f2f6138eb63401579279139e226dc3165162d4 (diff)
downloadlibkolabxml-ad79c1c7b9edb7db9118dade42c301f0e753df28.tar.gz
Allow overrides for PHP_INSTALL_DIR; Update Mac install guide
-rw-r--r--README-Mac.txt2
-rw-r--r--src/php/CMakeLists.txt4
2 files changed, 4 insertions, 2 deletions
diff --git a/README-Mac.txt b/README-Mac.txt
index b848457..34ac1f5 100644
--- a/README-Mac.txt
+++ b/README-Mac.txt
@@ -8,7 +8,7 @@
rm -rf build/
mkdir -p build
cd build
-cmake -DKOLAB_PHP_INSTALL_DIR:PATH=/usr/lib/php/extensions/no-debug-non-zts-20090626 -DCMAKE_INCLUDE_PATH:PATH=/opt/local/include -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
+cmake -DPHP_BINDINGS=TRUE -DPHP_INSTALL_DIR:PATH=/usr/lib/php/extensions/no-debug-non-zts-20090626 -DCMAKE_INCLUDE_PATH:PATH=/opt/local/include -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
make
sudo make install
diff --git a/src/php/CMakeLists.txt b/src/php/CMakeLists.txt
index f21e8d2..fb10d58 100644
--- a/src/php/CMakeLists.txt
+++ b/src/php/CMakeLists.txt
@@ -31,7 +31,9 @@ if (PHP4_FOUND)
configure_file(test.php ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
- set(PHP_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/phpbindings" CACHE STRING "Install directory for php bindings.")
+ if (NOT PHP_INSTALL_DIR)
+ set(PHP_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/phpbindings" CACHE STRING "Install directory for php bindings.")
+ endif()
install(TARGETS phpbindings LIBRARY DESTINATION ${PHP_INSTALL_DIR})