2 commits - autogen.sh CMakeLists.txt cmake/modules conversion/commonconversion.h conversion/kabcconversion.h conversion/kcalconversion.h conversion/kolabconversion.h kolabformat/errorhandler.cpp kolabformat/kolabobject.cpp tests/benchmark.cpp tests/formattest.cpp tests/kcalconversiontest.cpp tests/upgradetest.cpp

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Sat May 12 14:53:35 CEST 2012


 CMakeLists.txt                            |   15 ++----
 autogen.sh                                |   73 ++++++++++++++++++++++++++++++
 cmake/modules/FindKolabKDELibraries.cmake |   32 -------------
 conversion/commonconversion.h             |    2 
 conversion/kabcconversion.h               |    4 -
 conversion/kcalconversion.h               |    8 +--
 conversion/kolabconversion.h              |    4 -
 kolabformat/errorhandler.cpp              |    2 
 kolabformat/kolabobject.cpp               |    2 
 tests/benchmark.cpp                       |    2 
 tests/formattest.cpp                      |    4 -
 tests/kcalconversiontest.cpp              |    2 
 tests/upgradetest.cpp                     |    4 -
 13 files changed, 95 insertions(+), 59 deletions(-)

New commits:
commit e870c40ffdc19c007eaf8704723ef9ec841494f9
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sat May 12 13:44:42 2012 +0100

    Use -I pointing to /usr/include/kolabxml/ (pulled from the libkolabxml-devel cmake file) rather than including kolab/blah everywhere, as per naming convention the development headers for libkolabxml should reside in /usr/include/kolabxml, not /usr/include/kolab (which is where this package places its development headers)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9dbcdcd..a239ba7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,14 +24,9 @@ set(Libkolab_VERSION_MINOR 3)
 set(Libkolab_VERSION ${Libkolab_VERSION_MAJOR}.${Libkolab_VERSION_MINOR} )
 set(Libkolab_VERSION_STRING ${CMAKE_PROJECT_NAME}-${Libkolab_VERSION})
 
-# set up install directories. INCLUDE_INSTALL_DIR and LIB_INSTALL_DIR must not be absolute paths
-set(LIB_INSTALL_DIR_SUFFIX "" CACHE STRING "The directories where to install libraries to")
-set(LIB_INSTALL_DIR lib${LIB_INSTALL_DIR_SUFFIX} )
+# set up install directories.
 set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/Libkolab )
 
-# Use a versioned install directory for the headers so multiple versions can be installed in parallel
-set(INCLUDE_INSTALL_DIR include/kolab )
-
 # Do the building
 
 find_package(Qt4 4.7.0 REQUIRED)
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..962caef
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+dobuild=0
+doprep=0
+dotest=0
+doinstall=0
+
+srcdir=$(pwd)
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+        --build|-b)
+            dobuild=1
+            shift
+        ;;
+
+        --prep|-p)
+            doprep=1
+            shift
+        ;;
+
+        --test|-t)
+            dotest=1
+            shift
+        ;;
+
+        --install|-i)
+            doinstall=1
+            shift
+        ;;
+
+    esac
+done
+
+if [ ${dobuild} -eq 0 -a ${doprep} -eq 0 -a ${dotest} -eq 0 -a ${doinstall} -eq 0 ]; then
+    dobuild=1
+    doprep=1
+    dotest=1
+    doinstall=1
+fi
+
+# Rebuilds the entire foo in one go. One shot, one kill.
+rm -rf build/
+mkdir -p build
+cd build
+if [ ${doprep} -eq 1 ]; then
+    cmake \
+        -DCMAKE_VERBOSE_MAKEFILE=ON \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DLIB_INSTALL_DIR=/usr/lib64 \
+        -DINCLUDE_INSTALL_DIR=/usr/include/kolab \
+        ..
+fi
+
+if [ ${dobuild} -eq 1 ]; then
+    make
+fi
+
+if [ ${dotest} -eq 1 ]; then
+    # Execute some tests?
+    echo "Executing tests"
+fi
+
+if [ ${doinstall} -eq 1 ]; then
+    make install DESTDIR=${TMPDIR:-/tmp}
+fi
+
+cd ..
+
+git archive --prefix=libkolab-0.3/ HEAD | gzip -c > libkolab-0.3.tar.gz
+
+cp libkolab-0.3.tar.gz `rpm --eval='%{_sourcedir}'`
+
diff --git a/conversion/commonconversion.h b/conversion/commonconversion.h
index 049e8ae..301e54a 100644
--- a/conversion/commonconversion.h
+++ b/conversion/commonconversion.h
@@ -20,7 +20,7 @@
 
 #include <KDE/KDateTime>
 #include <QStringList>
-#include <kolab/kolabcontainers.h>
+#include <kolabcontainers.h>
 
 
 namespace Kolab {
diff --git a/conversion/kabcconversion.h b/conversion/kabcconversion.h
index 6430097..0b7863a 100644
--- a/conversion/kabcconversion.h
+++ b/conversion/kabcconversion.h
@@ -20,7 +20,7 @@
 
 #include "kolab_export.h"
 
-#include <kolab/kolabcontact.h>
+#include <kolabcontact.h>
 #include <kabc/addressee.h>
 #include <kabc/contactgroup.h>
 
@@ -40,4 +40,4 @@ namespace Kolab {
     };
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/conversion/kcalconversion.h b/conversion/kcalconversion.h
index 706059c..cd4f4e9 100644
--- a/conversion/kcalconversion.h
+++ b/conversion/kcalconversion.h
@@ -20,9 +20,9 @@
 
 #include "kolab_export.h"
 
-#include <kolab/kolabevent.h>
-#include <kolab/kolabtodo.h>
-#include <kolab/kolabjournal.h>
+#include <kolabevent.h>
+#include <kolabtodo.h>
+#include <kolabjournal.h>
 #include <kcalcore/event.h>
 #include <kcalcore/todo.h>
 #include <kcalcore/journal.h>
@@ -49,4 +49,4 @@ namespace Kolab {
     };
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/conversion/kolabconversion.h b/conversion/kolabconversion.h
index cae08fc..88de02e 100644
--- a/conversion/kolabconversion.h
+++ b/conversion/kolabconversion.h
@@ -20,7 +20,7 @@
 
 #include "kolab_export.h"
 
-#include <kolab/kolabnote.h>
+#include <kolabnote.h>
 #include <kmime/kmime_message.h>
 
 namespace Kolab {
@@ -36,4 +36,4 @@ namespace Kolab {
     };
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/kolabformat/errorhandler.cpp b/kolabformat/errorhandler.cpp
index 19817ad..4fc5147 100644
--- a/kolabformat/errorhandler.cpp
+++ b/kolabformat/errorhandler.cpp
@@ -20,7 +20,7 @@
 
 #include <qdebug.h>
 
-#include <kolab/kolabformat.h>
+#include <kolabformat.h>
 
 namespace Kolab {
     
diff --git a/kolabformat/kolabobject.cpp b/kolabformat/kolabobject.cpp
index 3b18a12..d078e8a 100644
--- a/kolabformat/kolabobject.cpp
+++ b/kolabformat/kolabobject.cpp
@@ -34,7 +34,7 @@
 #include <conversion/kabcconversion.h>
 #include <conversion/kolabconversion.h>
 #include <akonadi/notes/noteutils.h>
-#include <kolab/kolabformat.h>
+#include <kolabformat.h>
 
 
 namespace Kolab {
diff --git a/tests/benchmark.cpp b/tests/benchmark.cpp
index af11c85..28bf8d7 100644
--- a/tests/benchmark.cpp
+++ b/tests/benchmark.cpp
@@ -19,7 +19,7 @@
 #include "kolabformatV2/event.h"
 #include "conversion/kcalconversion.h"
 #include <kmime/kmime_message.h>
-#include <kolab/kolabformat.h>
+#include <kolabformat.h>
 #include <kdebug.h>
 #include "testutils.h"
 
diff --git a/tests/formattest.cpp b/tests/formattest.cpp
index ddc56e4..36d2ebe 100644
--- a/tests/formattest.cpp
+++ b/tests/formattest.cpp
@@ -26,8 +26,8 @@
 #include <qtemporaryfile.h>
 #include <QBuffer>
 #include <kdebug.h>
-#include <kolab/kolabcontainers.h>
-#include <kolab/kolabformat.h>
+#include <kolabcontainers.h>
+#include <kolabformat.h>
 
 #include <kcalcore/icalformat.h>
 #include <kabc/vcardconverter.h>
diff --git a/tests/kcalconversiontest.cpp b/tests/kcalconversiontest.cpp
index f5bfddb..8be49c5 100644
--- a/tests/kcalconversiontest.cpp
+++ b/tests/kcalconversiontest.cpp
@@ -4,7 +4,7 @@
 #include <QtCore/QObject>
 #include <QtTest/QtTest>
 #include <KDE/KSystemTimeZones>
-#include <kolab/kolabcontact.h>
+#include <kolabcontact.h>
 #include <kcalcore/recurrence.h>
 #include <kabc/addressee.h>
 
diff --git a/tests/upgradetest.cpp b/tests/upgradetest.cpp
index 5b06b39..3d692ad 100644
--- a/tests/upgradetest.cpp
+++ b/tests/upgradetest.cpp
@@ -19,8 +19,8 @@
 #include "upgradetest.h"
 
 #include <QTest>
-#include <kolab/kolabcontainers.h>
-#include <kolab/kolabformat.h>
+#include <kolabcontainers.h>
+#include <kolabformat.h>
 
 #include "testutils.h"
 #include "kolabformat/kolabobject.h"


commit f01b8f1a613901baa19bfc25a8da07213fccace7
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Sat May 5 13:14:36 2012 +0200

    We don't need the custon FindKolabKDELibraries and can use one installed by kdepimlibs instead. Specify required package versions.
    
    FindKolabKDELibraries also erroneusly produced absolute library paths, which makes it i.e impossible to use a distro libkolab to build
    kdepim-runtime (because you can't get the distro libkolab to use your compiled version of kdepimlibs).

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d579f7a..9dbcdcd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,10 +34,10 @@ set(INCLUDE_INSTALL_DIR include/kolab )
 
 # Do the building
 
-find_package(Qt4 REQUIRED)
-find_package(KDE4 REQUIRED)
+find_package(Qt4 4.7.0 REQUIRED)
+find_package(KDE4 4.8 REQUIRED)
+find_package(KdepimLibs 4.8 REQUIRED)
 find_package(Libkolabxml 0.4 REQUIRED)
-find_package(KolabKDELibraries REQUIRED)
 
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS} -fPIC" )
 
@@ -57,7 +57,7 @@ add_subdirectory(kolabformatV2)
 add_subdirectory(conversion)
 
 set(KOLAB_SRCS kolabformat/kolabobject.cpp kolabformat/errorhandler.cpp mime/mimeutils.cpp ${CONVERSION_SRCS} ${kolabformatv2_SRCS})
-set(KOLAB_LINK_LIBRARIES ${Libkolabxml_LIBRARIES} ${KCALCORE_LIBRARY} ${KABC_LIBRARY} ${KMIME_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBRARY} ${AKONADI-KDE_LIBRARY} ${AKONADI-NOTES_LIBRARY} ${KDE4_KIO_LIBRARY})
+set(KOLAB_LINK_LIBRARIES ${Libkolabxml_LIBRARIES} ${KDEPIMLIBS_KCALCORE_LIBS} ${KDEPIMLIBS_KABC_LIBS} ${KDEPIMLIBS_KMIME_LIBS} ${KDEPIMLIBS_AKONADI_LIBS} ${KDEPIMLIBS_AKONADI_NOTES_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBRARY} ${KDE4_KIO_LIBRARY})
 if(BUILD_TESTS)
     #for tests only
     kde4_add_library(kolab_static STATIC ${KOLAB_SRCS})
diff --git a/cmake/modules/FindKolabKDELibraries.cmake b/cmake/modules/FindKolabKDELibraries.cmake
deleted file mode 100644
index 3b12734..0000000
--- a/cmake/modules/FindKolabKDELibraries.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-#Find some libraries
-find_library(KCALCORE_LIBRARY NAMES kcalcore PATH_SUFFIXES kde4/devel)
-if(KCALCORE_LIBRARY)
-    set(KCALCORE_LIBRARY_FOUND ON)
-    message("KCalCore found: ${KCALCORE_LIBRARY}")
-    find_path(KDEPIMLIBS_INCLUDE_DIRS NAMES kcalcore/event.h)
-endif(KCALCORE_LIBRARY)
-
-find_library(KMIME_LIBRARY NAMES kmime)
-if(KMIME_LIBRARY)
-    set(KMIME_LIBRARY_FOUND ON)
-    message("KMime found: ${KMIME_LIBRARY}")
-endif(KMIME_LIBRARY)
-
-find_library(KABC_LIBRARY NAMES kabc)
-if(KABC_LIBRARY)
-    set(KABC_LIBRARY_FOUND ON)
-    message("KABC found: ${KABC_LIBRARY}")
-endif(KABC_LIBRARY)
-
-find_library(AKONADI-KDE_LIBRARY NAMES akonadi-kde)
-if(AKONADI-KDE_LIBRARY)
-    set(AKONADI-KDE_LIBRARY_FOUND ON)
-    message("AKONADI-KDE found: ${AKONADI-KDE_LIBRARY}")
-endif(AKONADI-KDE_LIBRARY)
-
-find_library(AKONADI-NOTES_LIBRARY NAMES akonadi-notes)
-if(AKONADI-NOTES_LIBRARY)
-    set(AKONADI-NOTES_LIBRARY_FOUND ON)
-    message("AKONADI-NOTES found: ${AKONADI-NOTES_LIBRARY}")
-endif(AKONADI-NOTES_LIBRARY)
-





More information about the commits mailing list