cmake/modules kolab-libs.spec.in libkolabxml/CMakeLists.txt libkolabxml/compiled libkolabxml/lib libkolabxml/Makefile.am Makefile.am

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Sat Mar 24 00:22:04 CET 2012


 Makefile.am                               |    1 
 cmake/modules/FindKolabInternal.cmake     |   51 -----------------------
 kolab-libs.spec.in                        |   66 ++++++++++++++++++------------
 libkolabxml/CMakeLists.txt                |   11 ++---
 libkolabxml/Makefile.am                   |    9 ----
 libkolabxml/compiled/XMLParserWrapper.cpp |    3 -
 libkolabxml/lib/CMakeLists.txt            |   17 ++++---
 libkolabxml/lib/base64.cpp                |    3 -
 libkolabxml/lib/global_definitions.h      |    2 
 libkolabxml/lib/incidence_p.h             |    3 -
 libkolabxml/lib/kolabcontact.h            |    1 
 libkolabxml/lib/kolabcontainers.cpp       |   11 ++---
 libkolabxml/lib/kolabcontainers.h         |    9 ++--
 libkolabxml/lib/kolabconversions.h        |    1 
 libkolabxml/lib/kolabevent.cpp            |    3 -
 libkolabxml/lib/kolabjournal.cpp          |    3 -
 libkolabxml/lib/kolabnote.cpp             |    1 
 libkolabxml/lib/kolabtodo.cpp             |    3 -
 libkolabxml/lib/php/CMakeLists.txt        |   11 +++--
 libkolabxml/lib/python/CMakeLists.txt     |   15 ++++--
 libkolabxml/lib/shared_conversions.h      |    3 -
 libkolabxml/lib/utils.cpp                 |    4 +
 libkolabxml/lib/xcardconversions.h        |    1 
 23 files changed, 108 insertions(+), 124 deletions(-)

New commits:
commit 61fbb2d4d532b1c59749b5f17b456228a7134ef8
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sat Mar 24 00:21:54 2012 +0100

    Fix typo

diff --git a/Makefile.am b/Makefile.am
index d0c5114..71ff93f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,6 +16,7 @@ EXTRA_DIST = \
 	INSTALL \
 	NEWS \
 	README \
+	cmake/modules/*.cmake \
 	$(PACKAGE).spec \
 	$(PACKAGE).spec.in
 
diff --git a/cmake/modules/FindKolabInternal.cmake b/cmake/modules/FindKolabInternal.cmake
deleted file mode 100644
index fb9d6a5..0000000
--- a/cmake/modules/FindKolabInternal.cmake
+++ /dev/null
@@ -1,51 +0,0 @@
-
-# The install directory is defined by the CMAKE_INSTALL_PREFIX which defaults to /usr/local if not specified.
-# To install i.e. to /usr use "cmake -DCMAKE_INSTALL_PREFIX=/usr ."
-#
-# The library directory suffix (64/32) is detected automatically based on the available directories in CMAKE_INSTALL_PREFIX
-# The Result of this can be overridden by setting KOLAB_LIB_INSTALL_DIR "cmake -DKOLAB_LIB_INSTALL_DIR=/usr/lib64/ ."
-#
-# The runtime install is controlled by KOLAB_BIN_INSTALL_DIR
-# The header install is controlled by KOLAB_HEADER_INSTALL_DIR
-#
-# KOLAB_INSTALL_DIRECTORIES contains the determined install directories and should be used with install commands
-
-get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
-
-if (${LIB64} STREQUAL "TRUE")
-    find_path(LIB32FOUND "${CMAKE_INSTALL_PREFIX}/lib32")
-    find_path(LIB64FOUND "${CMAKE_INSTALL_PREFIX}/lib64")
-    if (LIB64FOUND)
-        set(LIBSUFFIX 64)
-    else()
-        set(LIBSUFFIX "")
-    endif()
-else()
-    set(LIBSUFFIX "")
-endif()
-
-if(KOLAB_LIB_INSTALL_DIR)
-    message("KOLAB_LIB_INSTALL_DIR specified manually")
-else()
-    set(KOLAB_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIBSUFFIX}")
-endif()
-message("KOLAB_LIB_INSTALL_DIR: ${KOLAB_LIB_INSTALL_DIR}")
-
-if(KOLAB_BIN_INSTALL_DIR)
-    message("KOLAB_BIN_INSTALL_DIR specified manually")
-else()
-    set(KOLAB_BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
-endif()
-message("KOLAB_BIN_INSTALL_DIR: ${KOLAB_BIN_INSTALL_DIR}")
-
-set(KOLAB_INSTALL_DIRECTORIES  RUNTIME DESTINATION "${KOLAB_BIN_INSTALL_DIR}"
-                                  LIBRARY DESTINATION "${KOLAB_LIB_INSTALL_DIR}"
-                                  ARCHIVE DESTINATION "${KOLAB_LIB_INSTALL_DIR}" COMPONENT Devel )
-
-
-if(KOLAB_HEADER_INSTALL_DIR)
-    message("KOLAB_HEADER_INSTALL_DIR specified manually")
-else()
-    set(KOLAB_HEADER_INSTALL_DIR  "${CMAKE_INSTALL_PREFIX}/include/kolab")
-endif()
-message("KOLAB_HEADER_INSTALL_DIR: ${KOLAB_HEADER_INSTALL_DIR}")
diff --git a/kolab-libs.spec.in b/kolab-libs.spec.in
index a4c9d23..b4d1ca7 100644
--- a/kolab-libs.spec.in
+++ b/kolab-libs.spec.in
@@ -1,3 +1,5 @@
+%{!?python_include: %global python_include %{_includedir}/python%(%{__python} -c "from distutils.sysconfig import get_python_version; print(get_python_version())")}
+
 Name:           kolab-libs
 Version:        @VERSION@
 Release:        @RELEASE@%{?dist}
@@ -9,22 +11,28 @@ URL:            http://www.kolab.org
 Source0:        http://git.kolab.org/libkolabxml/snapshot/%{name}-%{version}.tar.gz
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
-# Does not build for RHEL 5, because of kdepimlibs-devel requirement
 %if 0%{?rhel} < 6 && 0%{?fedora} < 15
-BuildRequires:  boost141-devel >= 1.4.1
+BuildRequires:  boost141-devel
 %else
-BuildRequires:  boost-devel >= 1.4.1
+BuildRequires:  boost-devel
 %endif
 BuildRequires:  cmake >= 2.6
+BuildRequires:  e2fsprogs-devel
 BuildRequires:  gcc-c++
-BuildRequires:  gettext
-BuildRequires:  intltool
-#BuildRequires:  kdelibs-devel
-#BuildRequires:  kdepimlibs-devel
+%if 0%{?rhel} > 6 || 0%{?fedora} >= 16
+BuildRequires:  kdelibs-devel
+BuildRequires:  kdepimlibs-devel
+%endif
+%if 0%{?rhel} > 5
+BuildRequires:  libuuid-devel
+%endif
 BuildRequires:  php-devel
 BuildRequires:  python-devel
 BuildRequires:  qt-devel >= 3
 BuildRequires:  swig
+#%if 0%{?rhel} <= 6 || 0%{?fedora} < 15
+#BuildRequires:  uuid-devel
+#%endif
 BuildRequires:  xerces-c-devel
 BuildRequires:  xsd
 #Requires:       
@@ -65,27 +73,35 @@ bindings provided through libkolabxml.
 
 %build
 %configure
-%if 0%{?rhel} < 6 && 0%{?fedora} < 15
-export BOOST_INCLUDEDIR=/usr/include/boost141/
-%endif
 
 make %{?_smp_mflags}
 
-%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-
-# Workaround for https://issues.kolab.org/643
-%ifnarch %{ix86}
-mv %{buildroot}/%{_exec_prefix}/lib %{buildroot}/%{_libdir}
+pushd libkolabxml
+rm -rf build
+mkdir -p build
+pushd build
+%{cmake} -Wno-fatal-errors -Wno-errors \
+    -DCMAKE_SKIP_RPATH=ON \
+%if 0%{?rhel} <= 6 && 0%{?fedora} < 15
+    -DBOOST_LIBRARYDIR=%{_libdir}/boost141 \
+    -DBOOST_INCLUDEDIR=%{_includedir}/boost141 \
+    -DBoost_ADDITIONAL_VERSIONS="1.41;1.41.0" \
 %endif
+    -DPYTHON_INCLUDE_DIRS=%{python_include} \
+    -DKOLAB_PYTHON_INSTALL_DIR=%{python_sitearch} \
+    -DKOLAB_PHP_INSTALL_DIR=%{php_extdir} \
+    ..
+make 
+popd
+popd
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
 
-# Workaround for https://issues.kolab.org/644
-mkdir -p %{buildroot}/%{php_extdir}/
-mv `find %{buildroot}/ -type d -name phpbindings`/*kolabformat* %{buildroot}/%{php_extdir}/.
-mkdir -p %{buildroot}/%{python_sitearch}/
-mv `find %{buildroot}/ -type d -name pythonbindings`/*kolabformat* %{buildroot}/%{python_sitearch}/.
-rm -rf %{buildroot}/home
+pushd libkolabxml/build
+make install DESTDIR=%{buildroot}
+popd
 
 #%check
 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/c++/build/lib
@@ -97,7 +113,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc c++/README DEVELOPMENT INSTALL
+%doc DEVELOPMENT INSTALL
 %{_libdir}/*.so.*
 
 %files devel
@@ -112,7 +128,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n pykolab-format
 %defattr(-,root,root,-)
-%{python_sitearch}/pykolab
+%{python_sitelib}/pykolab
 %{python_sitearch}/kolabformat.py*
 %{python_sitearch}/_kolabformat.so
 
diff --git a/libkolabxml/CMakeLists.txt b/libkolabxml/CMakeLists.txt
index ae8b503..7016972 100644
--- a/libkolabxml/CMakeLists.txt
+++ b/libkolabxml/CMakeLists.txt
@@ -13,14 +13,15 @@ if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
     cmake_policy(SET CMP0017 NEW)
 endif()
 
-# Do not use RPATH
-set(CMAKE_SKIP_RPATH ON)
-include( ../cmake/modules/FindKolabInternal.cmake )
+find_package(Boost REQUIRED COMPONENTS thread-mt)
 
-find_package(Boost COMPONENTS thread REQUIRED)
+if (Boost_FOUND)
+    message("Found boost in ${Boost_INCLUDE_DIRS}")
+    include_directories(${Boost_INCLUDE_DIRS})
+endif (Boost_FOUND)
 
 if (${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.42)
-    find_library(UUID NAMES uuid)
+    find_library(UUID NAMES ossp-uuid uuid)
     if(UUID)
         message("uuid found")
     else (UUID)
diff --git a/libkolabxml/Makefile.am b/libkolabxml/Makefile.am
index 13d0dae..d26ae0c 100644
--- a/libkolabxml/Makefile.am
+++ b/libkolabxml/Makefile.am
@@ -29,13 +29,4 @@ EXTRA_DIST = \
 	tests/testfiles/ \
 	$(wildcard tests/testfiles/*.xml)
 
-all:
-	@rm -rf build/
-	@mkdir -p build/
-	@cd build/; cmake \
-		-DCMAKE_INSTALL_PREFIX=$(prefix) \
-		..; make
-
-install:
-	make -C build/ install
 
diff --git a/libkolabxml/compiled/XMLParserWrapper.cpp b/libkolabxml/compiled/XMLParserWrapper.cpp
index dffff8d..f6ebdf1 100644
--- a/libkolabxml/compiled/XMLParserWrapper.cpp
+++ b/libkolabxml/compiled/XMLParserWrapper.cpp
@@ -292,4 +292,5 @@ xml_schema::dom::auto_ptr<xercesc::DOMDocument> XMLParserWrapper::parse(std::ist
     }
     eh.reset();
     return xml_schema::dom::auto_ptr<xercesc::DOMDocument>();
-}
\ No newline at end of file
+}
+
diff --git a/libkolabxml/lib/CMakeLists.txt b/libkolabxml/lib/CMakeLists.txt
index 90f31f0..3c9fa51 100644
--- a/libkolabxml/lib/CMakeLists.txt
+++ b/libkolabxml/lib/CMakeLists.txt
@@ -3,16 +3,17 @@ SET_SOURCE_FILES_PROPERTIES(${SCHEMA_SOURCEFILES} PROPERTIES GENERATED 1)
 
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wp,-D_FORTIFY_SOURCE=2 -O2" ) #always generate shared libraries with -fPIC, -D_FORTIFY_SOURCE=2 enables some extra checking
 
-#Library with serialization/deserialization code and kolab-containers
+# Library with serialization/deserialization code and kolab-containers
 add_library(kolabxml SHARED kolabformat.cpp kolabcontainers.cpp kolabnote.cpp kolabevent.cpp kolabtodo.cpp kolabjournal.cpp kolabcontact.cpp utils.cpp base64.cpp ../compiled/XMLParserWrapper.cpp ../compiled/grammar-input-stream.cxx ${SCHEMA_SOURCEFILES})
 
 target_link_libraries(kolabxml ${XERCES_C} ${Boost_LIBRARIES} ${UUID})
 
-#For the core library we can be stricter when compiling. This doesn't work with the auto generated code though.
-set_target_properties(kolabxml PROPERTIES COMPILE_FLAGS "-Wall -Wextra -Werror -Wfatal-errors -Wl,--no-undefined")
+# For the core library we can be stricter when compiling. This doesn't work with the auto generated code though.
+#set_target_properties(kolabxml PROPERTIES COMPILE_FLAGS "-Wall -Wextra -Werror -Wfatal-errors -Wl,--no-undefined")
+set_target_properties(kolabxml PROPERTIES COMPILE_FLAGS "-Wall -Wl,--no-undefined")
 set_target_properties(kolabxml PROPERTIES VERSION 3.0.0 SOVERSION 0)
 
-install(TARGETS kolabxml ${KOLAB_INSTALL_DIRECTORIES})
+install(TARGETS kolabxml LIBRARY DESTINATION "${LIB_INSTALL_DIR}")
 
 install( FILES
     kolabformat.h
@@ -23,7 +24,7 @@ install( FILES
     kolabnote.h
     kolabcontainers.h
     global_definitions.h
-    DESTINATION ${KOLAB_HEADER_INSTALL_DIR} COMPONENT Devel)
+    DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
 
 #----- The following makes sure libkolabxml is found in the install directory for installed files and not in the build directory (for libraries which link to libkolabxml)
 
@@ -31,14 +32,14 @@ install( FILES
 SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
 # when building, don't use the install RPATH already(but later on when installing)
 SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 
-SET(CMAKE_INSTALL_RPATH "${KOLAB_LIB_INSTALL_DIR}")
+SET(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
 # add the automatically determined parts of the RPATH
 # which point to directories outside the build tree to the install RPATH
 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 # the RPATH to be used when installing, but only if it's not a system directory
-LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${KOLAB_LIB_INSTALL_DIR}" isSystemDir)
+LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" isSystemDir)
 IF("${isSystemDir}" STREQUAL "-1")
-   SET(CMAKE_INSTALL_RPATH "${KOLAB_LIB_INSTALL_DIR}")
+   SET(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
 ENDIF("${isSystemDir}" STREQUAL "-1")
 
 #-----------------------SWIG--------------------
diff --git a/libkolabxml/lib/base64.cpp b/libkolabxml/lib/base64.cpp
index 071b05c..528707b 100644
--- a/libkolabxml/lib/base64.cpp
+++ b/libkolabxml/lib/base64.cpp
@@ -120,4 +120,5 @@ std::string base64_decode(std::string const& encoded_string) {
   }
 
   return ret;
-}
\ No newline at end of file
+}
+
diff --git a/libkolabxml/lib/global_definitions.h b/libkolabxml/lib/global_definitions.h
index 2aa36e8..778337a 100644
--- a/libkolabxml/lib/global_definitions.h
+++ b/libkolabxml/lib/global_definitions.h
@@ -33,5 +33,5 @@ enum ErrorSeverity {
 };
 
 }
-
 #endif
+
diff --git a/libkolabxml/lib/incidence_p.h b/libkolabxml/lib/incidence_p.h
index 5f2dc12..c31795d 100644
--- a/libkolabxml/lib/incidence_p.h
+++ b/libkolabxml/lib/incidence_p.h
@@ -62,4 +62,5 @@ namespace Kolab {
     
 }
 
-#endif
\ No newline at end of file
+#endif
+
diff --git a/libkolabxml/lib/kolabcontact.h b/libkolabxml/lib/kolabcontact.h
index e4164dd..a838465 100644
--- a/libkolabxml/lib/kolabcontact.h
+++ b/libkolabxml/lib/kolabcontact.h
@@ -378,3 +378,4 @@ private:
 } //Namespace
 
 #endif // KOLABCONTACT_H
+
diff --git a/libkolabxml/lib/kolabcontainers.cpp b/libkolabxml/lib/kolabcontainers.cpp
index 491f9d7..0a20aaa 100644
--- a/libkolabxml/lib/kolabcontainers.cpp
+++ b/libkolabxml/lib/kolabcontainers.cpp
@@ -35,7 +35,7 @@ struct cDateTime::Private {
     int day;
     int hour;
     int minute;
-    int second;
+    double second;
     bool isUtc;
     std::string timezone;
 };
@@ -46,7 +46,7 @@ cDateTime::cDateTime()
 
 }
 
-cDateTime::cDateTime(int year, int month, int day, int hour, int minute, int second, bool isUtc)
+cDateTime::cDateTime(int year, int month, int day, int hour, int minute, double second, bool isUtc)
 : d(new cDateTime::Private())
 {
     d->year = year;
@@ -58,7 +58,7 @@ cDateTime::cDateTime(int year, int month, int day, int hour, int minute, int sec
     d->isUtc = isUtc;
 }
 
-cDateTime::cDateTime(const std::string& timezone, int year, int month, int day, int hour, int minute, int second)
+cDateTime::cDateTime(const std::string& timezone, int year, int month, int day, int hour, int minute, double second)
 : d(new cDateTime::Private())
 {
     d->year = year;
@@ -137,7 +137,7 @@ int cDateTime::minute() const
     return d->minute;
 }
 
-int cDateTime::second() const
+double cDateTime::second() const
 {
     return d->second;
 }
@@ -156,7 +156,7 @@ void cDateTime::setDate(int year, int month, int day)
     d->month = month;
     d->day = day;
 }
-void cDateTime::setTime(int hour, int minute, int second)
+void cDateTime::setTime(int hour, int minute, double second)
 {
     d->hour = hour;
     d->minute = minute;
@@ -727,3 +727,4 @@ Alarm::Type Alarm::type() const
 
 
 }//Namespace
+
diff --git a/libkolabxml/lib/kolabcontainers.h b/libkolabxml/lib/kolabcontainers.h
index 47dc5fc..3376c06 100644
--- a/libkolabxml/lib/kolabcontainers.h
+++ b/libkolabxml/lib/kolabcontainers.h
@@ -26,8 +26,8 @@ namespace Kolab {
 class cDateTime {
 public:
     cDateTime();
-    cDateTime(int year, int month, int day, int hour, int minute, int second, bool isUtc=true);
-    cDateTime(const std::string &timezone, int year, int month, int day, int hour, int minute, int second);
+    cDateTime(int year, int month, int day, int hour, int minute, double second, bool isUtc=true);
+    cDateTime(const std::string &timezone, int year, int month, int day, int hour, int minute, double second);
     cDateTime(int year, int month, int day);
     ~cDateTime();
     cDateTime(const cDateTime &);
@@ -42,10 +42,10 @@ public:
     
     bool isDateOnly() const;
     
-    void setTime(int hour, int minute, int second);
+    void setTime(int hour, int minute, double second);
     int hour() const;
     int minute() const;
-    int second() const;
+    double second() const;
     
     void setUTC(bool);
     bool isUTC() const;
@@ -398,3 +398,4 @@ class Configuration {
 }
 
 #endif
+
diff --git a/libkolabxml/lib/kolabconversions.h b/libkolabxml/lib/kolabconversions.h
index 4871acd..5a01adc 100644
--- a/libkolabxml/lib/kolabconversions.h
+++ b/libkolabxml/lib/kolabconversions.h
@@ -179,3 +179,4 @@ boost::shared_ptr<Kolab::Note> deserializeObject(const std::string& s, bool isUr
 } //Namespace
 
 #endif
+
diff --git a/libkolabxml/lib/kolabevent.cpp b/libkolabxml/lib/kolabevent.cpp
index 07b4bb0..aef772e 100644
--- a/libkolabxml/lib/kolabevent.cpp
+++ b/libkolabxml/lib/kolabevent.cpp
@@ -335,4 +335,5 @@ std::vector< Alarm > Event::alarms() const
 
 
 
-}
\ No newline at end of file
+}
+
diff --git a/libkolabxml/lib/kolabjournal.cpp b/libkolabxml/lib/kolabjournal.cpp
index f13633b..bfefd04 100644
--- a/libkolabxml/lib/kolabjournal.cpp
+++ b/libkolabxml/lib/kolabjournal.cpp
@@ -188,4 +188,5 @@ std::vector< CustomProperty > Journal::customProperties() const
 }
 
 
-}//Namespace
\ No newline at end of file
+}//Namespace
+
diff --git a/libkolabxml/lib/kolabnote.cpp b/libkolabxml/lib/kolabnote.cpp
index c7931bb..d316b0d 100644
--- a/libkolabxml/lib/kolabnote.cpp
+++ b/libkolabxml/lib/kolabnote.cpp
@@ -183,3 +183,4 @@ std::vector< CustomProperty > Note::customProperties() const
 }
 
 } //Note
+
diff --git a/libkolabxml/lib/kolabtodo.cpp b/libkolabxml/lib/kolabtodo.cpp
index 97d2e03..9c53511 100644
--- a/libkolabxml/lib/kolabtodo.cpp
+++ b/libkolabxml/lib/kolabtodo.cpp
@@ -324,4 +324,5 @@ std::vector< Alarm > Todo::alarms() const
     return d->alarms;
 }
 
-}
\ No newline at end of file
+}
+
diff --git a/libkolabxml/lib/php/CMakeLists.txt b/libkolabxml/lib/php/CMakeLists.txt
index 2d95c36..2d0a78a 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})
diff --git a/libkolabxml/lib/python/CMakeLists.txt b/libkolabxml/lib/python/CMakeLists.txt
index 397405c..4f7c1f7 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})
diff --git a/libkolabxml/lib/shared_conversions.h b/libkolabxml/lib/shared_conversions.h
index fd64ae5..92dfb92 100644
--- a/libkolabxml/lib/shared_conversions.h
+++ b/libkolabxml/lib/shared_conversions.h
@@ -119,4 +119,5 @@ std::string fromContactReference(const Kolab::ContactReference &c, bool embeddNa
     } //Namespace
 } //Namespace
 
-#endif
\ No newline at end of file
+#endif
+
diff --git a/libkolabxml/lib/utils.cpp b/libkolabxml/lib/utils.cpp
index 8096f54..dcab70d 100644
--- a/libkolabxml/lib/utils.cpp
+++ b/libkolabxml/lib/utils.cpp
@@ -16,6 +16,7 @@
 */
 
 #include "utils.h"
+#include <iostream>
 #include <string>
 
 #include <boost/version.hpp>
@@ -245,4 +246,5 @@ std::string fromMailto(const std::string &mailtoUri)
 
 } //Namespace
 
-} //Namespace
\ No newline at end of file
+} //Namespace
+
diff --git a/libkolabxml/lib/xcardconversions.h b/libkolabxml/lib/xcardconversions.h
index b3c1577..e051cd4 100644
--- a/libkolabxml/lib/xcardconversions.h
+++ b/libkolabxml/lib/xcardconversions.h
@@ -1090,3 +1090,4 @@ boost::shared_ptr<T> deserializeCard(const std::string& s, bool isUrl)
 } //Namespace
 
 #endif
+





More information about the commits mailing list