summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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