From 9801ff66262387672112214de75d53e0871a7720 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 1 Aug 2012 14:43:00 -0400 Subject: removed another bunch of dbus dependencies and compile with --no-undefined to find missing symbols before trying to link something against the installed library. --- CMakeLists.txt | 2 +- kabc/CMakeLists.txt | 3 ++- kdecore/config/kconfig.cpp | 4 ++++ kdecore/date/ksystemtimezone.cpp | 2 ++ kdecore/sycoca/ksycoca.cpp | 4 ++++ notes/CMakeLists.txt | 3 ++- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3c29cc..00408a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.6) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" ) +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wl,--no-undefined" ) set(LIBCALENDARING_VERSION_MAJOR 0) set(LIBCALENDARING_VERSION_MINOR 1) diff --git a/kabc/CMakeLists.txt b/kabc/CMakeLists.txt index 9361330..213b752 100644 --- a/kabc/CMakeLists.txt +++ b/kabc/CMakeLists.txt @@ -106,7 +106,8 @@ QT4_AUTOMOC("${kabc_LIB_SRCS}") add_library(calendaring-kabc ${LIBRARY_TYPE} ${kabc_LIB_SRCS}) -target_link_libraries(calendaring-kabc ${KDE4_KDEUI_LIBS} ${KDE4_KDECORE_LIBS}) +target_link_libraries(calendaring-kabc ${KDE4_KDEUI_LIBS} ${KDE4_KDECORE_LIBS} +${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} calendaring-kdecore) target_link_libraries(calendaring-kabc LINK_INTERFACE_LIBRARIES ${KDE4_KDEUI_LIBS}) set_target_properties(calendaring-kabc PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) diff --git a/kdecore/config/kconfig.cpp b/kdecore/config/kconfig.cpp index fcf0ce9..5d7990a 100644 --- a/kdecore/config/kconfig.cpp +++ b/kdecore/config/kconfig.cpp @@ -35,7 +35,9 @@ #include #include #include +#ifndef KDE_NO_DBUS #include +#endif #include #include @@ -497,7 +499,9 @@ void KConfig::checkUpdate(const QString &id, const QString &updateFile) const QString cfg_id = updateFile+QLatin1Char(':')+id; const QStringList ids = cg.readEntry("update_info", QStringList()); if (!ids.contains(cfg_id)) { +#ifndef KDE_NO_DBUS KToolInvocation::kdeinitExecWait(QString::fromLatin1("kconf_update"), QStringList() << QString::fromLatin1("--check") << updateFile); +#endif reparseConfiguration(); } } diff --git a/kdecore/date/ksystemtimezone.cpp b/kdecore/date/ksystemtimezone.cpp index ff66297..ed2983c 100644 --- a/kdecore/date/ksystemtimezone.cpp +++ b/kdecore/date/ksystemtimezone.cpp @@ -56,7 +56,9 @@ #include #include #include +#ifndef KDE_NO_DBUS #include +#endif #include #include #include "ktzfiletimezone.h" diff --git a/kdecore/sycoca/ksycoca.cpp b/kdecore/sycoca/ksycoca.cpp index dfbcbb6..5c1d6a5 100644 --- a/kdecore/sycoca/ksycoca.cpp +++ b/kdecore/sycoca/ksycoca.cpp @@ -22,7 +22,9 @@ #include "ksycoca_p.h" #include "ksycocatype.h" #include "ksycocafactory.h" +#ifndef KDE_NO_DBUS #include "ktoolinvocation.h" +#endif #include "kglobal.h" #include "kmemfile.h" #include "kde_file.h" @@ -437,7 +439,9 @@ bool KSycocaPrivate::checkDatabase(BehaviorsIfNotFound ifNotFound) // but otherwise we simply need to run kbuildsycoca to recreate the sycoca file. if (!kdeinitRunning) { kDebug(7011) << "We have no database.... launching kdeinit"; +#ifndef KDE_NO_DBUS KToolInvocation::klauncher(); // this calls startKdeinit, and blocks until it returns +#endif // and since kdeinit4 only returns after kbuildsycoca4 is done, we can proceed. } else { //kDebug(7011) << QThread::currentThread() << "We have no database.... launching" << KBUILDSYCOCA_EXENAME; diff --git a/notes/CMakeLists.txt b/notes/CMakeLists.txt index 941a324..dcc8fac 100644 --- a/notes/CMakeLists.txt +++ b/notes/CMakeLists.txt @@ -30,7 +30,8 @@ set(akonadinotes_LIB_SRC ) add_library(calendaring-akonadi-notes ${LIBRARY_TYPE} ${akonadinotes_LIB_SRC}) -target_link_libraries(calendaring-akonadi-notes calendaring-kmime ${QT_QTXML_LIBRARY}) +target_link_libraries(calendaring-akonadi-notes calendaring-kmime +${QT_QTXML_LIBRARY} ${QT_QTGUI_LIBRARY}) set_target_properties(calendaring-akonadi-notes PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION}) -- cgit v0.12