[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [choqok] /
From:       Theo Chatzimichos <tampakrap () gentoo ! org>
Date:       2011-01-21 17:23:03
Message-ID: 20110121172303.E22C0A6092 () git ! kde ! org
[Download RAW message or body]

Git commit f292e4052ee53bd652ea6ed3b13e3fcb024c1e3c by Theo Chatzimichos
Pushed by theoc into branch master

Finishing commit 81969e4, actuall fix the automagic dep to
libindicate-qt, bug was in FindQtIndicate.cmake
Rename two cmake variables:
 - QTINDICATE_FOUND -> QtIndicate_FOUND (to match the name of the Find module)
 - HAVE_INDICATEQT -> QTINDICATE_BUILD (makes more sense now)

M  +11   -6    CMakeLists.txt     
M  +3    -3    choqok/config/behavior/CMakeLists.txt     
M  +1    -1    choqok/config/behavior/behaviorconfig.cpp     
M  +16   -19   cmake/modules/FindQtIndicate.cmake     
M  +5    -5    libchoqok/CMakeLists.txt     
M  +2    -2    libchoqok/ui/choqokmainwindow.cpp     

http://commits.kde.org/choqok/f292e4052ee53bd652ea6ed3b13e3fcb024c1e3c

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67dda82..a37bb74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,19 +8,24 @@ set(CHOQOK_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
 
 set(CMAKE_MODULE_PATH ${CHOQOK_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
 
-option(QTINDICATE_ENABLE "Enable support for notifications via indicator")
+option(QTINDICATE_DISABLE "Disable support for notifications via indicator")
 
 find_package(QJson REQUIRED)
 find_package(QCA2 REQUIRED)
 find_package(QtOAuth REQUIRED)
 
-if(QTINDICATE_ENABLE)
-    find_package(QtIndicate QUIET)
+if(NOT QTINDICATE_DISABLE)
+    find_package(QtIndicate)
+    if(QtIndicate_FOUND)
+        set(QTINDICATE_BUILD TRUE)
+	endif(QtIndicate_FOUND)
+endif(NOT QTINDICATE_DISABLE)
+
+if(QTINDICATE_BUILD)
     message(STATUS "Found libindicate-qt: Will support notifications via indicator")
-    set(HAVE_INDICATEQT true)
-else(QTINDICATE_ENABLE)
+else(QTINDICATE_BUILD)
     message(STATUS "Optional dependency libindicate-qt not found: Won't support \
                notifications via indicator")
-endif(QTINDICATE_ENABLE)
+endif(QTINDICATE_BUILD)
 
 set(CHOQOK_INCLUDES
 ${KDE4_INCLUDES}
diff --git a/choqok/config/behavior/CMakeLists.txt \
b/choqok/config/behavior/CMakeLists.txt index f430425..321ed9d 100644
--- a/choqok/config/behavior/CMakeLists.txt
+++ b/choqok/config/behavior/CMakeLists.txt
@@ -3,9 +3,9 @@ include_directories(
 ${CHOQOK_INCLUDES}
 )
 
-if(QTINDICATE_FOUND)
-    add_definitions(-DHAVE_INDICATEQT)
-endif(QTINDICATE_FOUND)
+if(QtIndicate_FOUND)
+	add_definitions(-DQTINDICATE_BUILD)
+endif(QtIndicate_FOUND)
 
 ########### next target ###############
 
diff --git a/choqok/config/behavior/behaviorconfig.cpp \
b/choqok/config/behavior/behaviorconfig.cpp index 303c884..3926e74 100644
--- a/choqok/config/behavior/behaviorconfig.cpp
+++ b/choqok/config/behavior/behaviorconfig.cpp
@@ -74,7 +74,7 @@ BehaviorConfig::BehaviorConfig(QWidget *parent, const QVariantList \
&args) :  d->mBehaviorTabCtl->addTab(mPrfsGeneralDlg, i18n("&General"));
     d->mPrfsGeneral.kcfg_updateInterval->setSuffix(ki18np(" Minute", " Minutes"));
 
-#ifdef HAVE_INDICATEQT
+#ifdef INDICATEQT_BUILD
     // "Notifications" TAB \
============================================================  QWidget *mPrfsNotifyDlg \
= new QWidget(d->mBehaviorTabCtl);  d->mPrfsNotify.setupUi(mPrfsNotifyDlg);
diff --git a/cmake/modules/FindQtIndicate.cmake b/cmake/modules/FindQtIndicate.cmake
index 1f36fe1..1c3bc68 100644
--- a/cmake/modules/FindQtIndicate.cmake
+++ b/cmake/modules/FindQtIndicate.cmake
@@ -1,7 +1,7 @@
 # - Try to find the indicate-qt library
 # Once done this will define
 #
-#  QTINDICATE_FOUND - system has the QtIndicate library
+#  QtIndicate_FOUND - system has the QtIndicate library
 #  QTINDICATE_INCLUDE_DIRS - the QtIndicate include directories
 #  QTINDICATE_LIBRARY - Link this to use the QtIndicate library
 #
@@ -10,28 +10,25 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
-if (QTINDICATE_INCLUDE_DIRS AND QTINDICATE_LIBRARY)
-    # in cache already
-set(QTINDICATE_FOUND TRUE)
-
-else (QTINDICATE_INCLUDE_DIRS AND QTINDICATE_LIBRARY)
-    if (NOT WIN32)
-        find_package(PkgConfig)
-        pkg_check_modules(PC_QTINDICATE indicate-qt)
-    endif(NOT WIN32)
+if (NOT WIN32)
+    find_package(PkgConfig)
+    pkg_check_modules(PC_QTINDICATE indicate-qt)
+endif(NOT WIN32)
 
-    find_library(QTINDICATE_LIBRARY NAMES indicate-qt
+find_library(QTINDICATE_LIBRARY NAMES indicate-qt
     HINTS  ${PC_QTINDICATE_LIBDIR} ${PC_QTINDICATE_LIBRARY_DIRS}
-    )
+)
 
-    find_path(QTINDICATE_INCLUDE_DIR libindicate-qt/qindicateserver.h
+find_path(QTINDICATE_INCLUDE_DIR libindicate-qt/qindicateserver.h
     HINTS ${PC_QTINDICATE_INCLUDEDIR} ${PC_QTINDICATE_INCLUDE_DIRS}
-    )
-    set(QTINDICATE_INCLUDE_DIRS ${QTINDICATE_INCLUDE_DIR} \
${QTINDICATE_INCLUDE_DIR}/libindicate-qt) +)
+set(QTINDICATE_INCLUDE_DIRS ${QTINDICATE_INCLUDE_DIR} \
${QTINDICATE_INCLUDE_DIR}/libindicate-qt)  
-    include(FindPackageHandleStandardArgs)
-    find_package_handle_standard_args(QtIndicate DEFAULT_MSG QTINDICATE_LIBRARY \
QTINDICATE_INCLUDE_DIRS) +include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(QtIndicate DEFAULT_MSG QTINDICATE_LIBRARY \
QTINDICATE_INCLUDE_DIRS)  
-    mark_as_advanced(QTINDICATE_INCLUDE_DIRS QTINDICATE_LIBRARY)
+mark_as_advanced(QTINDICATE_INCLUDE_DIRS QTINDICATE_LIBRARY)
 
-    endif (QTINDICATE_INCLUDE_DIRS AND QTINDICATE_LIBRARY)
+if (QTINDICATE_INCLUDE_DIRS AND QTINDICATE_LIBRARY)
+    set(QtIndicate_FOUND TRUE)
+endif (QTINDICATE_INCLUDE_DIRS AND QTINDICATE_LIBRARY)
diff --git a/libchoqok/CMakeLists.txt b/libchoqok/CMakeLists.txt
index 23dd8e1..0837bb1 100644
--- a/libchoqok/CMakeLists.txt
+++ b/libchoqok/CMakeLists.txt
@@ -31,11 +31,11 @@ ui/uploadmediadialog.cpp
 ui/textbrowser.cpp
 )
 
-if(QTINDICATE_FOUND)
+if(QtIndicate_FOUND)
     set(choqok_LIB_SRCS ${choqok_LIB_SRCS} indicatormanager.cpp)
     include_directories(${QTINDICATE_INCLUDE_DIRS})
-    add_definitions(-DHAVE_INDICATEQT)
-endif(QTINDICATE_FOUND)
+    add_definitions(-DQTINDICATE_BUILD)
+endif(QtIndicate_FOUND)
 
 qt4_add_dbus_adaptor( choqok_LIB_SRCS org.kde.choqok.xml dbushandler.h \
Choqok::DbusHandler ChoqokAdaptor )   
@@ -50,10 +50,10 @@ kde4_add_library(choqok SHARED ${choqok_LIB_SRCS})
 
 target_link_libraries(choqok ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} \
${KDE4_KUTILS_LIBS})  
-if(QTINDICATE_FOUND)
+if(QtIndicate_FOUND)
        add_definitions(-DXDG_APPS_INSTALL_DIR=${XDG_APPS_INSTALL_DIR})
        target_link_libraries(choqok ${QTINDICATE_LIBRARY})
-endif(QTINDICATE_FOUND)
+endif(QtIndicate_FOUND)
 
 set_target_properties(choqok PROPERTIES
 VERSION 0.9.98
diff --git a/libchoqok/ui/choqokmainwindow.cpp b/libchoqok/ui/choqokmainwindow.cpp
index c84594b..19a7393 100644
--- a/libchoqok/ui/choqokmainwindow.cpp
+++ b/libchoqok/ui/choqokmainwindow.cpp
@@ -28,7 +28,7 @@
 #include <KTabWidget>
 #include "microblogwidget.h"
 
-#ifdef HAVE_INDICATEQT
+#ifdef QTINDICATE_BUILD
 #include "indicatormanager.h"
 #endif
 
@@ -39,7 +39,7 @@ static const int TIMEOUT = 5000;
 Choqok::UI::MainWindow::MainWindow()
     :KXmlGuiWindow()
 {
-#ifdef HAVE_INDICATEQT
+#ifdef QTINDICATE_BUILD
     Choqok::MessageIndicatorManager::self();
 #endif
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic