summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-03-27 02:16:41 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-03-27 02:16:41 (GMT)
commitf0c0ecb6d5fabbf494491094515848b671dd1373 (patch)
tree510ac4fd4ec6f49b3b6bc0464e4daa58ad335b76
parent3088c8496c4950269f90d6b076b6235045025e85 (diff)
downloadlibkolabxml-f0c0ecb6d5fabbf494491094515848b671dd1373.tar.gz
Install PHP/Python wrappers into their correct locations
-rw-r--r--libkolabxml/lib/php/CMakeLists.txt11
-rw-r--r--libkolabxml/lib/python/CMakeLists.txt15
2 files changed, 18 insertions, 8 deletions
diff --git a/libkolabxml/lib/php/CMakeLists.txt b/libkolabxml/lib/php/CMakeLists.txt
index 2d95c36..7cfc5c7 100644
--- a/libkolabxml/lib/php/CMakeLists.txt
+++ b/libkolabxml/lib/php/CMakeLists.txt
@@ -28,9 +28,14 @@ SET_TARGET_PROPERTIES(phpbindings PROPERTIES PREFIX "")
configure_file(test.php ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
-install(TARGETS phpbindings LIBRARY DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/phpbindings)
+if (KOLAB_PHP_INSTALL_DIR)
+ set(PHP_INSTALL_DIR ${KOLAB_PHP_INSTALL_DIR})
+else (KOLAB_PHP_INSTALL_DIR)
+ set(PHP_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/phpbindings)
+endif (KOLAB_PHP_INSTALL_DIR)
+
+install(TARGETS phpbindings LIBRARY DESTINATION ${PHP_INSTALL_DIR})
install( FILES
${CMAKE_CURRENT_BINARY_DIR}/kolabformat.php
- test.php
- DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/phpbindings) \ No newline at end of file
+ DESTINATION ${PHP_INSTALL_DIR}) \ No newline at end of file
diff --git a/libkolabxml/lib/python/CMakeLists.txt b/libkolabxml/lib/python/CMakeLists.txt
index 397405c..7f0cdd1 100644
--- a/libkolabxml/lib/python/CMakeLists.txt
+++ b/libkolabxml/lib/python/CMakeLists.txt
@@ -1,4 +1,4 @@
-#Generate Python wrapper
+# Generate Python wrapper
include_directories(../)
set(KOLAB_SWIG_PYTHON_SOURCE_FILE python_kolabformat_wrapper.cpp)
@@ -13,7 +13,7 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_PYTHON_SOURCE
SET_SOURCE_FILES_PROPERTIES(${KOLAB_SWIG_PYTHON_SOURCE_FILE} PROPERTIES GENERATED 1)
ADD_CUSTOM_TARGET(generate_python_bindings ALL DEPENDS ${KOLAB_SWIG_PYTHON_SOURCE_FILE})
-#Compile Python Bindings
+# Compile Python Bindings
find_package(PythonLibs)
include_directories(${PYTHON_INCLUDE_DIRS})
@@ -26,9 +26,14 @@ SET_TARGET_PROPERTIES(pythonbindings PROPERTIES PREFIX "")
configure_file(test.py ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
-install(TARGETS pythonbindings LIBRARY DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/pythonbindings)
+if (KOLAB_PYTHON_INSTALL_DIR)
+ set(PYTHON_INSTALL_DIR ${KOLAB_PYTHON_INSTALL_DIR})
+else (KOLAB_PYTHON_INSTALL_DIR)
+ set(PYTHON_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/pythonbindings)
+endif (KOLAB_PYTHON_INSTALL_DIR)
+
+install(TARGETS pythonbindings LIBRARY DESTINATION ${PYTHON_INSTALL_DIR})
install( FILES
${CMAKE_CURRENT_BINARY_DIR}/kolabformat.py
- test.py
- DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/pythonbindings) \ No newline at end of file
+ DESTINATION ${PYTHON_INSTALL_DIR}) \ No newline at end of file