Hello community,

here is the log from the commit of package libqimageblitz4 for openSUSE:Factory
checked in at Tue May 17 16:16:18 CEST 2011.



--------
--- KDE/libqimageblitz4/libqimageblitz4.changes 2008-04-13 14:45:52.000000000 
+0200
+++ /mounts/work_src_done/STABLE/libqimageblitz4/libqimageblitz4.changes        
2011-05-16 23:20:48.000000000 +0200
@@ -1,0 +2,12 @@
+Mon May 16 21:06:40 UTC 2011 - [email protected]
+
+- Update to 0.0.6
+- Spec file updates:
+  * Changes based on spec-cleaner run.
+  * Changes in Group, Url, Summary and %description entries.
+  * Removed Provides/Obsoletes entries for libblitz4.
+  * Removed %changelog entries.
+  * Minor other updates.
+- Added a patch (taken from Fedora) to fix "executable-stack" rpmlint warning.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  qimageblitz-0.0.4.tar.bz2

New:
----
  qimageblitz-0.0.4-noexecstack.patch
  qimageblitz-0.0.6.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libqimageblitz4.spec ++++++
--- /var/tmp/diff_new_pack.mD0Ulw/_old  2011-05-17 16:11:40.000000000 +0200
+++ /var/tmp/diff_new_pack.mD0Ulw/_new  2011-05-17 16:11:40.000000000 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package libqimageblitz4 (Version 0.0.4)
+# spec file for package libqimageblitz4
 #
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,73 +19,64 @@
 
 
 Name:           libqimageblitz4
-BuildRequires:  cmake kde4-filesystem libqt4-devel
+Version:        0.0.6
+Release:        1
 License:        BSD 3-Clause
-Group:          Development/Libraries/C and C++
-Summary:        Image Effect Library for KDE
+Summary:        Graphical effect and filter library for KDE
+Url:            http://qimageblitz.sourceforge.net/
+Group:          System/Libraries
+Source0:        
ftp://ftp.kde.org/pub/kde/stable/qimageblitz/qimageblitz-%{version}.tar.bz2
+# PATCH-FIX-UPSTREAM qimageblitz-0.0.4-noexecstack.patch -- Fix 
"executable-stack" rpmlint warning (taken from Fedora - upstreamed to 
kdesupport)
+Patch0:         qimageblitz-0.0.4-noexecstack.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Url:            http://delta.affinix.com/qca/
-Version:        0.0.4
-Release:        98
-Provides:       libblitz4 = 0.0.svn705164
-Obsoletes:      libblitz4 <= 0.0.svn705164
-Source:         qimageblitz-%version.tar.bz2
+BuildRequires:  cmake
+BuildRequires:  kde4-filesystem
+BuildRequires:  libqt4-devel
 
 %description
-Blitz is an interm image effect library that people can use until KDE
-4.1 is released. KImageEffect, the old image effect class is being
-dropped for KDE 4.0 and the replacement, Quasar, won't be ready until
-KDE 4.1. Blitz gives people something to use in the meantime.
-
-
-
-Authors:
---------
-    Daniel Duley <[email protected]>
+libqimageblitz4 is a graphical effect and filter library for KDE4 that contains
+many improvements over KDE 3.x's kdefx library including bugfixes, memory and
+speed improvements, and MMX/SSE support.
 
 %package -n libqimageblitz-devel
 License:        BSD 3-Clause
-Summary:        Image Effect Library for KDE
+Summary:        Development files for libqimageblitz
 Group:          Development/Libraries/C and C++
-Provides:       libblitz-devel = 0.0.svn705164
-Obsoletes:      libblitz-devel <= 0.0.svn705164
-Requires:       %name = %version
+Requires:       %{name} = %{version}
 Requires:       libqt4-devel
 
 %description -n libqimageblitz-devel
-Development files for the Blitz library.
-
-
-
-Authors:
---------
-    Daniel Duley <[email protected]>
+This package contains development files for libqimageblitz.
 
 %prep
-%setup -q -n qimageblitz-%version
+%setup -q -n qimageblitz-%{version}
+%patch0 -p1
 
 %build
-%cmake_kde4
+%cmake_kde4 -d build
 %make_jobs
 
 %install
-%makeinstall
+cd build
+%kde4_makeinstall
+cd ..
 
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
 %files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
 %{_libdir}/libqimageblitz.so.4*
 
 %files -n libqimageblitz-devel
-%defattr(-,root,root)
-/usr/bin/blitztest
-/usr/include/qimageblitz
+%defattr(-,root,root,-)
+%doc COPYING Changelog README.*
+%{_bindir}/blitztest
+%{_includedir}/qimageblitz/
 %{_libdir}/libqimageblitz.so
 %{_libdir}/pkgconfig/qimageblitz.pc
 

++++++ qimageblitz-0.0.4-noexecstack.patch ++++++
Use non-executable stack to make selinux happier
Upstreamed to kdesupport,
r1204248 | rdieter | 2010-12-06 08:05:09 -0600 (Mon, 06 Dec 2010) | 2 lines

diff -ur qimageblitz-0.0.706674/blitz/asm_scale.S 
qimageblitz-0.0.706674-noexecstack/blitz/asm_scale.S
--- qimageblitz-0.0.706674/blitz/asm_scale.S    2007-08-13 20:49:30.000000000 
+0200
+++ qimageblitz-0.0.706674-noexecstack/blitz/asm_scale.S        2008-02-07 
04:23:47.000000000 +0100
@@ -1,3 +1,4 @@
+.section .note.GNU-stack,"",%progbits
 
 #if defined(__EMX__)
 /* Due to strange behaviour of as.exe we use this macros */
++++++ qimageblitz-0.0.4.tar.bz2 -> qimageblitz-0.0.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qimageblitz-0.0.4/CMakeLists.txt 
new/qimageblitz-0.0.6/CMakeLists.txt
--- old/qimageblitz-0.0.4/CMakeLists.txt        2007-11-07 12:58:44.000000000 
+0100
+++ new/qimageblitz-0.0.6/CMakeLists.txt        2010-07-28 20:06:14.000000000 
+0200
@@ -1,19 +1,22 @@
 project(blitz)
+
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} 
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules )
 find_package(Qt4 REQUIRED)
+# properly set up compile flags (QT_DEBUG/QT_NO_DEBUG, ...)
+include(${QT_USE_FILE})
 
 
 set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
-set(EXEC_INSTALL_PREFIX  ${CMAKE_INSTALL_PREFIX}       CACHE PATH  "Base 
directory for executables and libraries" FORCE)
+set(EXEC_INSTALL_PREFIX  ${CMAKE_INSTALL_PREFIX}       CACHE PATH  "Base 
directory for executables and libraries")
 #
 ## the following are directories where stuff will be installed to
-set(BIN_INSTALL_DIR          "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The kde 
binary install dir (default prefix/bin)" FORCE)
-set(LIB_INSTALL_DIR          "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}"     
CACHE PATH "The subdirectory relative to the install prefix where libraries 
will be installed (default is /lib${LIB_SUFFIX})" FORCE)
-set(INCLUDE_INSTALL_DIR      "${CMAKE_INSTALL_PREFIX}/include/qimageblitz"     
        CACHE PATH "The subdirectory to the header prefix" FORCE)
+set(BIN_INSTALL_DIR          "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The kde 
binary install dir (default prefix/bin)")
+set(LIB_INSTALL_DIR          "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}"     
CACHE PATH "The subdirectory relative to the install prefix where libraries 
will be installed (default is /lib${LIB_SUFFIX})")
 
 if (CMAKE_COMPILER_IS_GNUCXX)
    if (CMAKE_SYSTEM_NAME MATCHES Linux)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor 
-Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common")
+       add_definitions(-DQT_NO_EXCEPTIONS)
    endif (CMAKE_SYSTEM_NAME MATCHES Linux)
 endif (CMAKE_COMPILER_IS_GNUCXX)
 
@@ -22,5 +25,18 @@
  set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin )
 endif (WIN32)
 
+# Set up RPATH handling, so the libs are found if they are installed to a 
non-standard location.
+# By default cmake builds the targets with full RPATH to everything in the 
build directory,
+# but then removes the RPATH when installing.
+# These two options below make it set the RPATH of the installed targets to all
+# RPATH directories outside the current CMAKE_BINARY_DIR and also the library 
+# install directory. Alex
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH  TRUE)
+set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}" )
+
+if(APPLE)
+   set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
+endif(APPLE)
+
 add_subdirectory(blitz)
 add_subdirectory(test)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qimageblitz-0.0.4/blitz/CMakeLists.txt 
new/qimageblitz-0.0.6/blitz/CMakeLists.txt
--- old/qimageblitz-0.0.4/blitz/CMakeLists.txt  2007-11-07 12:58:44.000000000 
+0100
+++ new/qimageblitz-0.0.6/blitz/CMakeLists.txt  2010-07-28 20:06:14.000000000 
+0200
@@ -2,18 +2,13 @@
 include(CheckCXXSourceCompiles)
 include(CheckIncludeFile)
 
-if (APPLE)
- set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
- set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
-endif (APPLE)
-
 include_directories(
-${CMAKE_SOURCE_DIR}  
-${blitz_lib_BINARY_DIR} 
-${QT_INCLUDE_DIR}
-${QT_QTCORE_INCLUDE_DIR}  
-${QT_QTGUI_INCLUDE_DIR}
-)
+  ${CMAKE_SOURCE_DIR}  
+  ${blitz_lib_BINARY_DIR} 
+  ${QT_INCLUDE_DIR}
+  ${QT_QTCORE_INCLUDE_DIR}  
+  ${QT_QTGUI_INCLUDE_DIR}
+  )
 
 CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
 
@@ -32,7 +27,7 @@
 SET(BLITZ_LIB_VERSION_STRING 
"${BLITZ_LIB_MAJOR_VERSION}.${BLITZ_LIB_MINOR_VERSION}.${BLITZ_LIB_PATCH_VERSION}")
 
 set(blitz_LIB_SRCS blitz.cpp colors.cpp convolve.cpp histogram.cpp
-blitzcpu.cpp scale.cpp scalefilter.cpp gradient.cpp)
+                   blitzcpu.cpp scale.cpp scalefilter.cpp gradient.cpp)
 
 if(HAVE_MMX)
     if(NOT APPLE AND NOT WIN32)
@@ -47,9 +42,16 @@
 configure_file (config-processor.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config-processor.h )
 configure_file (config-externalasm.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config-externalasm.h )
 
+if(COMMAND cmake_policy)
+      cmake_policy(SET CMP0003 NEW)
+endif(COMMAND cmake_policy) 
+
 add_library(qimageblitz SHARED ${blitz_LIB_SRCS} ${blitz_LIB_EXTRA_SRCS})
 
 target_link_libraries(qimageblitz ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+if (NOT CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME MATCHES SunOS)
+    target_link_libraries(qimageblitz -lm -lsunmath)
+endif (NOT CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME MATCHES SunOS)
 
 set_target_properties(qimageblitz PROPERTIES
                             VERSION 
${BLITZ_LIB_MAJOR_VERSION}.${BLITZ_LIB_MINOR_VERSION}.${BLITZ_LIB_PATCH_VERSION}
@@ -60,10 +62,9 @@
     RUNTIME DESTINATION ${BIN_INSTALL_DIR} 
     LIBRARY DESTINATION ${LIB_INSTALL_DIR} 
     ARCHIVE DESTINATION ${LIB_INSTALL_DIR} 
-)  
-install( FILES qimageblitz.h DESTINATION ${INCLUDE_INSTALL_DIR} ) 
-install( FILES qimageblitz_export.h DESTINATION ${INCLUDE_INSTALL_DIR} )
-install( FILES blitzcpu.h DESTINATION ${INCLUDE_INSTALL_DIR} )
+)
+
+install( FILES qimageblitz.h qimageblitz_export.h blitzcpu.h DESTINATION 
include/qimageblitz COMPONENT Devel )
 
 if(NOT WIN32)
   configure_file("qimageblitz.pc.cmake" 
"${CMAKE_CURRENT_BINARY_DIR}/qimageblitz.pc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qimageblitz-0.0.4/blitz/histogram.cpp 
new/qimageblitz-0.0.6/blitz/histogram.cpp
--- old/qimageblitz-0.0.4/blitz/histogram.cpp   2007-11-07 12:58:44.000000000 
+0100
+++ new/qimageblitz-0.0.6/blitz/histogram.cpp   2010-07-28 20:06:14.000000000 
+0200
@@ -65,19 +65,19 @@
 
 typedef struct
 {
-    qint32 red, green, blue, alpha;
+    quint32 red, green, blue, alpha;
 } IntegerPixel;
 
 typedef struct
 {
-    qint16 red, green, blue, alpha;
+    quint16 red, green, blue, alpha;
 } ShortPixel;
 
 typedef struct
 {
     // Yes, a normal pixel can be used instead but this is easier to read
     // and no shifts to get components.
-    qint8 red, green, blue, alpha;
+    quint8 red, green, blue, alpha;
 } CharPixel;
 
 typedef struct
@@ -200,7 +200,7 @@
     CharPixel *normalize_map;
     ShortPixel high, low;
 
-    int threshold_intensity;
+    uint threshold_intensity;
     int i, count;
     QRgb pixel, *dest;
     unsigned char r, g, b;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qimageblitz-0.0.4/blitz/scalefilter.cpp 
new/qimageblitz-0.0.6/blitz/scalefilter.cpp
--- old/qimageblitz-0.0.4/blitz/scalefilter.cpp 2007-11-07 12:58:44.000000000 
+0100
+++ new/qimageblitz-0.0.6/blitz/scalefilter.cpp 2010-07-28 20:06:14.000000000 
+0200
@@ -89,61 +89,61 @@
     // are inline
     static const float
         J1Pone[] = {
-            0.581199354001606143928050809e+21,
-            -0.6672106568924916298020941484e+20,
-            0.2316433580634002297931815435e+19,
-            -0.3588817569910106050743641413e+17,
-            0.2908795263834775409737601689e+15,
-            -0.1322983480332126453125473247e+13,
-            0.3413234182301700539091292655e+10,
-            -0.4695753530642995859767162166e+7,
-            0.270112271089232341485679099e+4
+            0.581199354001606143928050809e+21f,
+            -0.6672106568924916298020941484e+20f,
+            0.2316433580634002297931815435e+19f,
+            -0.3588817569910106050743641413e+17f,
+            0.2908795263834775409737601689e+15f,
+            -0.1322983480332126453125473247e+13f,
+            0.3413234182301700539091292655e+10f,
+            -0.4695753530642995859767162166e+7f,
+            0.270112271089232341485679099e+4f
         },
         J1Qone[] = {
-            0.11623987080032122878585294e+22,
-            0.1185770712190320999837113348e+20,
-            0.6092061398917521746105196863e+17,
-            0.2081661221307607351240184229e+15,
-            0.5243710262167649715406728642e+12,
-            0.1013863514358673989967045588e+10,
-            0.1501793594998585505921097578e+7,
-            0.1606931573481487801970916749e+4,
+            0.11623987080032122878585294e+22f,
+            0.1185770712190320999837113348e+20f,
+            0.6092061398917521746105196863e+17f,
+            0.2081661221307607351240184229e+15f,
+            0.5243710262167649715406728642e+12f,
+            0.1013863514358673989967045588e+10f,
+            0.1501793594998585505921097578e+7f,
+            0.1606931573481487801970916749e+4f,
             0.1e+1
         };
 
     static const float
         P1Pone[] = {
-            0.352246649133679798341724373e+5,
-            0.62758845247161281269005675e+5,
-            0.313539631109159574238669888e+5,
-            0.49854832060594338434500455e+4,
-            0.2111529182853962382105718e+3,
-            0.12571716929145341558495e+1
+            0.352246649133679798341724373e+5f,
+            0.62758845247161281269005675e+5f,
+            0.313539631109159574238669888e+5f,
+            0.49854832060594338434500455e+4f,
+            0.2111529182853962382105718e+3f,
+            0.12571716929145341558495e+1f
         },
         P1Qone[] = {
-            0.352246649133679798068390431e+5,
-            0.626943469593560511888833731e+5,
-            0.312404063819041039923015703e+5,
-            0.4930396490181088979386097e+4,
-            0.2030775189134759322293574e+3,
-            0.1e+1
+            0.352246649133679798068390431e+5f,
+            0.626943469593560511888833731e+5f,
+            0.312404063819041039923015703e+5f,
+            0.4930396490181088979386097e+4f,
+            0.2030775189134759322293574e+3f,
+            0.1e+1f
         };
 
     static const float
         Q1Pone[] = {
-            0.3511751914303552822533318e+3,
-            0.7210391804904475039280863e+3,
-            0.4259873011654442389886993e+3,
-            0.831898957673850827325226e+2,
-            0.45681716295512267064405e+1,
-            0.3532840052740123642735e-1
+            0.3511751914303552822533318e+3f,
+            0.7210391804904475039280863e+3f,
+            0.4259873011654442389886993e+3f,
+            0.831898957673850827325226e+2f,
+            0.45681716295512267064405e+1f,
+            0.3532840052740123642735e-1f
         },
         Q1Qone[] = {
-            0.74917374171809127714519505e+4,
-            0.154141773392650970499848051e+5,
-            0.91522317015169922705904727e+4,
-            0.18111867005523513506724158e+4,
-            0.1038187585462133728776636e+3,
+            0.74917374171809127714519505e+4f,
+            0.154141773392650970499848051e+5f,
+            0.91522317015169922705904727e+4f,
+            0.18111867005523513506724158e+4f,
+            0.1038187585462133728776636e+3f,
             0.1e+1
         };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qimageblitz-0.0.4/cmake/modules/FindQt4.cmake 
new/qimageblitz-0.0.6/cmake/modules/FindQt4.cmake
--- old/qimageblitz-0.0.4/cmake/modules/FindQt4.cmake   2007-11-07 
12:58:44.000000000 +0100
+++ new/qimageblitz-0.0.6/cmake/modules/FindQt4.cmake   2010-07-28 
20:06:14.000000000 +0200
@@ -2,11 +2,11 @@
 # This module can be used to find Qt4.
 # The most important issue is that the Qt4 qmake is available via the system 
path.
 # This qmake is then used to detect basically everything else.
-# This module defines a number of key variables and macros. First is 
-# QT_USE_FILE which is the path to a CMake file that can be included to compile
-# Qt 4 applications and libraries.  By default, the QtCore and QtGui 
+# This module defines a number of key variables and macros. 
+# First is QT_USE_FILE which is the path to a CMake file that can be included 
+# to compile Qt 4 applications and libraries.  By default, the QtCore and 
QtGui 
 # libraries are loaded. This behavior can be changed by setting one or more 
-# of the following variables to true:
+# of the following variables to true before doing INCLUDE(${QT_USE_FILE}):
 #                    QT_DONT_USE_QTCORE
 #                    QT_DONT_USE_QTGUI
 #                    QT_USE_QT3SUPPORT
@@ -24,15 +24,60 @@
 #                    QT_USE_QTUITOOLS
 #                    QT_USE_QTDBUS
 #                    QT_USE_QTSCRIPT
+#                    QT_USE_QTASSISTANTCLIENT
+#                    QT_USE_QTHELP
+#                    QT_USE_QTWEBKIT
+#                    QT_USE_QTXMLPATTERNS
+#                    QT_USE_PHONON
+#
+# The file pointed to by QT_USE_FILE will set up your compile environment
+# by adding include directories, preprocessor defines, and populate a
+# QT_LIBRARIES variable containing all the Qt libraries and their dependencies.
+# Add the QT_LIBRARIES variable to your TARGET_LINK_LIBRARIES.
+#
+# Typical usage could be something like:
+#   FIND_PACKAGE(Qt4)
+#   SET(QT_USE_QTXML 1)
+#   INCLUDE(${QT_USE_FILE})
+#   ADD_EXECUTABLE(myexe main.cpp)
+#   TARGET_LINK_LIBRARIES(myexe ${QT_LIBRARIES})
 #
-# All the libraries required are stored in a variable called QT_LIBRARIES.  
-# Add this variable to your TARGET_LINK_LIBRARIES.
+#
+# There are also some files that need processing by some Qt tools such as moc
+# and uic.  Listed below are macros that may be used to process those files.
 #  
-#  macro QT4_WRAP_CPP(outfiles inputfile ... )
-#  macro QT4_WRAP_UI(outfiles inputfile ... )
-#  macro QT4_ADD_RESOURCES(outfiles inputfile ... )
-#  macro QT4_AUTOMOC(inputfile ... )
+#  macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
+#        create moc code from a list of files containing Qt class with
+#        the Q_OBJECT declaration.  Options may be given to moc, such as those 
found
+#        when executing "moc -help"
+#
+#  macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
+#        create code from a list of Qt designer ui files.
+#        Options may be given to uic, such as those found
+#        when executing "uic -help"
+#
+#  macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
+#        create code from a list of Qt resource files.
+#        Options may be given to rcc, such as those found
+#        when executing "rcc -help"
+#
 #  macro QT4_GENERATE_MOC(inputfile outputfile )
+#        creates a rule to run moc on infile and create outfile.
+#        Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g.
+#        because you need a custom filename for the moc file or something 
similar.
+#
+#  macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... )
+#        This macro is still experimental.
+#        It can be used to have moc automatically handled.
+#        So if you have the files foo.h and foo.cpp, and in foo.h a 
+#        a class uses the Q_OBJECT macro, moc has to run on it. If you don't
+#        want to use QT4_WRAP_CPP() (which is reliable and mature), you can 
insert
+#        #include "foo.moc"
+#        in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This 
will the
+#        scan all listed files at cmake-time for such included moc files and 
if it finds
+#        them cause a rule to be generated to run moc at build time on the 
+#        accompanying header file foo.h.
+#        If a source file has the SKIP_AUTOMOC property set it will be ignored 
by this macro.
 #
 #  macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
 #        create a the interface header and implementation files with the 
@@ -57,11 +102,12 @@
 #        If <classname> is provided, then it will be used as the classname of 
the
 #        adaptor itself.
 #
-#  macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] )
+#  macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
 #        generate the xml interface file from the given header.
 #        If the optional argument interfacename is omitted, the name of the 
 #        interface file is constructed from the basename of the header with
 #        the suffix .xml appended.
+#        Options may be given to uic, such as those found when executing 
"qdbuscpp2xml --help"
 #
 #  QT_FOUND         If false, don't try to use Qt.
 #  QT4_FOUND        If false, don't try to use Qt 4.
@@ -83,15 +129,30 @@
 #  QT_QTSCRIPT_FOUND      True if QtScript was found.
 #  QT_QTTEST_FOUND        True if QtTest was found.
 #  QT_QTUITOOLS_FOUND     True if QtUiTools was found.
-#                      
+#  QT_QTASSISTANTCLIENT_FOUND         True if QtAssistantClient was found.
+#  QT_QTHELP_FOUND      True if QtHelp was found.
+#  QT_QTWEBKIT_FOUND        True if QtWebKit was found.
+#  QT_QTXMLPATTERNS_FOUND   True if QtXmlPatterns was found.
+#  QT_PHONON_FOUND          True if phonon was found.
+#
+#
 #  QT_DEFINITIONS   Definitions to use when compiling code that uses Qt.
+#                   You do not need to use this if you include QT_USE_FILE.
+#                   The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG
+#                   to fit your current build type.  Those are not contained
+#                   in QT_DEFINITIONS.
 #                  
 #  QT_INCLUDES      List of paths to all include directories of 
 #                   Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are
 #                   always in this variable even if NOTFOUND,
 #                   all other INCLUDE_DIRS are
 #                   only added if they are found.
+#                   You do not need to use this if you include QT_USE_FILE.
 #   
+#
+#  Include directories for the Qt modules are listed here.
+#  You do not need to use these variables if you include QT_USE_FILE.
+#
 #  QT_INCLUDE_DIR              Path to "include" of Qt4
 #  QT_QT_INCLUDE_DIR           Path to "include/Qt" 
 #  QT_QT3SUPPORT_INCLUDE_DIR   Path to "include/Qt3Support" 
@@ -110,6 +171,11 @@
 #  QT_QTSVG_INCLUDE_DIR        Path to "include/QtSvg"
 #  QT_QTSCRIPT_INCLUDE_DIR     Path to "include/QtScript"
 #  QT_QTTEST_INCLUDE_DIR       Path to "include/QtTest"
+#  QT_QTASSISTANTCLIENT_INCLUDE_DIR       Path to "include/QtAssistant"
+#  QT_QTHELP_INCLUDE_DIR       Path to "include/QtHelp"
+#  QT_QTWEBKIT_INCLUDE_DIR     Path to "include/QtWebKit"
+#  QT_QTXMLPATTERNS_INCLUDE_DIR  Path to "include/QtXmlPatterns"
+#  QT_PHONON_INCLUDE_DIR       Path to "include/phonon"
 #                            
 #  QT_LIBRARY_DIR              Path to "lib" of Qt4
 # 
@@ -153,6 +219,20 @@
 # The qtmain library for Windows QT_QTMAIN_LIBRARY
 #
 # The QtUiTools library:      QT_QTUITOOLS_LIBRARY
+
+#
+# The QtAssistantClient library:  QT_QTASSISTANTCLIENT_LIBRARY
+#
+# The QtHelp library:             QT_QTHELP_LIBRARY
+#
+# The QtWebKit library:           QT_QTWEBKIT_LIBRARY
+#
+# The QtXmlPatterns library:      QT_QTXMLPATTERNS_LIBRARY
+#
+# The Phonon library:             QT_PHONON_LIBRARY
+
+
+
 #  
 # also defined, but NOT for general use are
 #  QT_MOC_EXECUTABLE          Where to find the moc tool.
@@ -161,6 +241,8 @@
 #  QT_RCC_EXECUTABLE          Where to find the rcc tool
 #  QT_DBUSCPP2XML_EXECUTABLE  Where to find the qdbuscpp2xml tool.
 #  QT_DBUSXML2CPP_EXECUTABLE  Where to find the qdbusxml2cpp tool.
+#  QT_LUPDATE_EXECUTABLE      Where to find the lupdate tool.
+#  QT_LRELEASE_EXECUTABLE     Where to find the lrelease tool.
 #  
 #  QT_DOC_DIR                 Path to "doc" of Qt4
 #  QT_MKSPECS_DIR             Path to "mkspecs" of Qt4
@@ -186,6 +268,17 @@
 
 else (QT4_QMAKE_FOUND)
 
+# check that QT_NO_DEBUG is defined for release configurations
+MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC)
+  IF(NOT ${VAR} MATCHES "${FLAG}")
+    SET(${VAR} "${${VAR}} ${FLAG}" 
+      CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE)
+  ENDIF(NOT ${VAR} MATCHES "${FLAG}")
+ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR)
+QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release 
with Debug Info")
+QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release")
+QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release 
minsize")
+
 INCLUDE(CheckSymbolExists)
 INCLUDE(MacroAddFileDependencies)
 INCLUDE(MacroPushRequiredVars)
@@ -226,10 +319,12 @@
 
 ENDMACRO(QT_QUERY_QMAKE)
 
+GET_FILENAME_COMPONENT(qt_install_version 
"[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
 # check for qmake
 FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 PATHS
   "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
   "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
+  
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
   $ENV{QTDIR}/bin
 )
 
@@ -310,6 +405,8 @@
     EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
       ARGS "-query QT_INSTALL_LIBS"
       OUTPUT_VARIABLE QT_LIBRARY_DIR_TMP )
+    # make sure we have / and not \ as qmake gives on windows
+    FILE(TO_CMAKE_PATH "${QT_LIBRARY_DIR_TMP}" QT_LIBRARY_DIR_TMP)
     IF(EXISTS "${QT_LIBRARY_DIR_TMP}")
       SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir")
     ELSE(EXISTS "${QT_LIBRARY_DIR_TMP}")
@@ -331,45 +428,60 @@
   ENDIF (APPLE)
   
   # ask qmake for the binary dir
-  IF (NOT QT_BINARY_DIR)
+  IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR)
      EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
-        ARGS "-query QT_INSTALL_BINS"
-        OUTPUT_VARIABLE qt_bins )
+       ARGS "-query QT_INSTALL_BINS"
+       OUTPUT_VARIABLE qt_bins )
+     # make sure we have / and not \ as qmake gives on windows
+     FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins)
      SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "")
-  ENDIF (NOT QT_BINARY_DIR)
+  ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR)
 
   # ask qmake for the include dir
-  IF (NOT QT_HEADERS_DIR)
+  IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR)
       EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
         ARGS "-query QT_INSTALL_HEADERS" 
-        OUTPUT_VARIABLE qt_headers )
+        OUTPUT_VARIABLE qt_headers ) 
+      # make sure we have / and not \ as qmake gives on windows
+      FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers)
       SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "")
-  ENDIF(NOT QT_HEADERS_DIR)
+  ENDIF(QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR)
 
 
   # ask qmake for the documentation directory
-  IF (NOT QT_DOC_DIR)
+  IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR)
     EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
       ARGS "-query QT_INSTALL_DOCS"
       OUTPUT_VARIABLE qt_doc_dir )
+    # make sure we have / and not \ as qmake gives on windows
+    FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir)
     SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs")
-  ENDIF (NOT QT_DOC_DIR)
+  ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR)
 
   # ask qmake for the mkspecs directory
-  IF (NOT QT_MKSPECS_DIR)
+  IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR)
     EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
       ARGS "-query QMAKE_MKSPECS"
-      OUTPUT_VARIABLE qt_mkspecs_dir )
-    SET(QT_MKSPECS_DIR ${qt_mkspecs_dir} CACHE PATH "The location of the Qt 
mkspecs")
-  ENDIF (NOT QT_MKSPECS_DIR)
+      OUTPUT_VARIABLE qt_mkspecs_dirs )
+    # do not replace : on windows as it might be a drive letter
+    # and windows should already use ; as a separator
+    IF(UNIX)
+      STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
+    ENDIF(UNIX)
+    FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs}
+      DOC "The location of the Qt mkspecs containing qconfig.pri"
+      NO_DEFAULT_PATH )
+  ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR)
 
   # ask qmake for the plugins directory
-  IF (NOT QT_PLUGINS_DIR)
+  IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR)
     EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
       ARGS "-query QT_INSTALL_PLUGINS"
       OUTPUT_VARIABLE qt_plugins_dir )
+    # make sure we have / and not \ as qmake gives on windows
+    FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir)
     SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt 
plugins")
-  ENDIF (NOT QT_PLUGINS_DIR)
+  ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR)
   ########################################
   #
   #       Setting the INCLUDE-Variables
@@ -489,11 +601,12 @@
     NO_DEFAULT_PATH
     )
 
-
-
   # Set QT_QTMOTIF_INCLUDE_DIR
   IF(Q_WS_X11)
-    FIND_PATH(QT_QTMOTIF_INCLUDE_DIR QtMotif PATHS ${QT_INCLUDE_DIR}/QtMotif 
NO_DEFAULT_PATH )
+    FIND_PATH(QT_QTMOTIF_INCLUDE_DIR QtMotif 
+      PATHS 
+      ${QT_INCLUDE_DIR}/QtMotif 
+      NO_DEFAULT_PATH )
   ENDIF(Q_WS_X11)
 
   # Set QT_QTNETWORK_INCLUDE_DIR
@@ -541,6 +654,7 @@
     PATHS
     ${QT_INCLUDE_DIR}/QtAssistant
     ${QT_HEADERS_DIR}/QtAssistant
+    ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
     NO_DEFAULT_PATH
     )
 
@@ -548,7 +662,8 @@
   FIND_PATH(QT_QTDESIGNER_INCLUDE_DIR QDesignerComponents
     PATHS
     ${QT_INCLUDE_DIR}/QtDesigner
-    ${QT_HEADERS_DIR}/QtDesigner
+    ${QT_HEADERS_DIR}/QtDesigner 
+    ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
     NO_DEFAULT_PATH
     )
 
@@ -560,7 +675,6 @@
     NO_DEFAULT_PATH
     )
 
-
   # Set QT_QTDBUS_INCLUDE_DIR
   FIND_PATH(QT_QTDBUS_INCLUDE_DIR QtDBus
     PATHS
@@ -568,13 +682,51 @@
     ${QT_HEADERS_DIR}/QtDBus
     NO_DEFAULT_PATH
     )
+  
+  # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
+  FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient
+    PATHS
+    ${QT_INCLUDE_DIR}/QtAssistant
+    ${QT_HEADERS_DIR}/QtAssistant
+    NO_DEFAULT_PATH
+    )
+  
+  # Set QT_QTHELP_INCLUDE_DIR
+  FIND_PATH(QT_QTHELP_INCLUDE_DIR QtHelp
+    PATHS
+    ${QT_INCLUDE_DIR}/QtHelp
+    ${QT_HEADERS_DIR}/QtHelp
+    NO_DEFAULT_PATH
+    )
+  
+  # Set QT_QTWEBKIT_INCLUDE_DIR
+  FIND_PATH(QT_QTWEBKIT_INCLUDE_DIR QtWebKit
+    PATHS
+    ${QT_INCLUDE_DIR}/QtWebKit
+    ${QT_HEADERS_DIR}/QtWebKit
+    NO_DEFAULT_PATH
+    )
+  
+  # Set QT_QTXMLPATTERNS_INCLUDE_DIR
+  FIND_PATH(QT_QTXMLPATTERNS_INCLUDE_DIR QtXmlPatterns
+    PATHS
+    ${QT_INCLUDE_DIR}/QtXmlPatterns
+    ${QT_HEADERS_DIR}/QtXmlPatterns
+    NO_DEFAULT_PATH
+    )
+  
+  # Set QT_PHONON_INCLUDE_DIR
+  FIND_PATH(QT_PHONON_INCLUDE_DIR phonon
+    PATHS
+    ${QT_INCLUDE_DIR}/phonon
+    NO_DEFAULT_PATH
+    )
 
   # Make variables changeble to the advanced user
   MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_QT_INCLUDE_DIR QT_DOC_DIR 
QT_MKSPECS_DIR QT_PLUGINS_DIR)
 
   # Set QT_INCLUDES
-  SET( QT_INCLUDES ${QT_INCLUDE_DIR} ${QT_QT_INCLUDE_DIR} 
${QT_MKSPECS_DIR}/default )
-
+  SET( QT_INCLUDES ${QT_QT_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default 
${QT_INCLUDE_DIR} )
 
   ########################################
   #
@@ -655,6 +807,28 @@
       SET(QT_QTTEST_FOUND FALSE)
     ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtTest.framework)
 
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtAssistantClient.framework)
+      SET(QT_QTASSISTANTCLIENT_FOUND TRUE)
+      SET(QT_QTASSISTANTCLIENT_LIBRARY "-F${QT_LIBRARY_DIR} -framework 
QtAssistantClient" CACHE STRING "The QtAssistantClient library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtAssistantClient.framework)
+      SET(QT_QTASSISTANTCLIENT_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtAssistantClient.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtWebKit.framework)
+      SET(QT_QTWEBKIT_FOUND TRUE)
+      SET(QT_QTWEBKIT_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtWebKit" CACHE 
STRING "The QtWebKit library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtWebKit.framework)
+      SET(QT_QTWEBKIT_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtWebKit.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtXmlPatterns.framework)
+      SET(QT_QTXMLPATTERNS_FOUND TRUE)
+      SET(QT_QTXMLPATTERNS_LIBRARY "-F${QT_LIBRARY_DIR} -framework 
QtXmlPatterns" CACHE STRING "The QtXmlPatterns library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtXmlPatterns.framework)
+      SET(QT_QTXMLPATTERNS_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtXmlPatterns.framework)
+
+
     # WTF?  why don't we have frameworks?  :P
     # Set QT_QTUITOOLS_LIBRARY
     FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 PATHS 
${QT_LIBRARY_DIR} )
@@ -664,47 +838,58 @@
   ELSE (QT_USE_FRAMEWORKS)
     
     # Set QT_QTCORE_LIBRARY by searching for a lib with "QtCore."  as part of 
the filename
-    FIND_LIBRARY(QT_QTCORE_LIBRARY NAMES QtCore QtCore4 QtCored4          
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH )
+    FIND_LIBRARY(QT_QTCORE_LIBRARY NAMES QtCore QtCore4 QtCored4 QtCore_debug  
       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH )
 
     # Set QT_QT3SUPPORT_LIBRARY
-    FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY NAMES Qt3Support Qt3Support4 
Qt3Supportd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY NAMES Qt3Support Qt3Support_debug 
Qt3Support4 Qt3Supportd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTGUI_LIBRARY
-    FIND_LIBRARY(QT_QTGUI_LIBRARY NAMES QtGui QtGui4 QtGuid4            PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTGUI_LIBRARY NAMES QtGui QtGui_debug QtGui_debug QtGui4 
QtGuid4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTMOTIF_LIBRARY
     IF(Q_WS_X11)
-      FIND_LIBRARY(QT_QTMOTIF_LIBRARY NAMES QtMotif          PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+      FIND_LIBRARY(QT_QTMOTIF_LIBRARY NAMES QtMotif  QtMotif_debug PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
     ENDIF(Q_WS_X11)
 
     # Set QT_QTNETWORK_LIBRARY
-    FIND_LIBRARY(QT_QTNETWORK_LIBRARY NAMES QtNetwork QtNetwork4 QtNetworkd4 
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTNETWORK_LIBRARY NAMES QtNetwork QtNetwork_debug 
QtNetwork4 QtNetworkd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTNSPLUGIN_LIBRARY
-    FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY NAMES QtNsPlugin      PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY NAMES QtNsPlugin QtNsPlugin_debug PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTOPENGL_LIBRARY
-    FIND_LIBRARY(QT_QTOPENGL_LIBRARY NAMES QtOpenGL QtOpenGL4 QtOpenGLd4    
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTOPENGL_LIBRARY NAMES QtOpenGL QtOpenGL_debug QtOpenGL4 
QtOpenGLd4    PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTSQL_LIBRARY
-    FIND_LIBRARY(QT_QTSQL_LIBRARY NAMES QtSql QtSql4 QtSqld4       PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTSQL_LIBRARY NAMES QtSql QtSql_debug QtSql4 QtSqld4       
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTXML_LIBRARY
-    FIND_LIBRARY(QT_QTXML_LIBRARY NAMES QtXml QtXml4 QtXmld4       PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTXML_LIBRARY NAMES QtXml QtXml_debug QtXml4 QtXmld4       
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTSVG_LIBRARY
-    FIND_LIBRARY(QT_QTSVG_LIBRARY NAMES QtSvg QtSvg4 QtSvgd4       PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTSVG_LIBRARY NAMES QtSvg QtSvg_debug QtSvg4 QtSvgd4       
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTSCRIPT_LIBRARY
-    FIND_LIBRARY(QT_QTSCRIPT_LIBRARY NAMES QtScript QtScript4 QtScriptd4   
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTSCRIPT_LIBRARY NAMES QtScript QtScript_debug QtScript4 
QtScriptd4   PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTUITOOLS_LIBRARY
-    FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 QtUiToolsd4 
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools_debug 
QtUiTools4 QtUiToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     # Set QT_QTTEST_LIBRARY
-    FIND_LIBRARY(QT_QTTEST_LIBRARY NAMES QtTest QtTest4 QtTestd4          
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTTEST_LIBRARY NAMES QtTest QtTest_debug QtTest4 QtTestd4  
        PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTDBUS_LIBRARY NAMES QtDBus QtDBus_debug QtDBus4 QtDBusd4  
       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY NAMES QtAssistantClient 
QtAssistantClient_debug QtAssistantClient4 QtAssistantClientd4         PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTHELP_LIBRARY NAMES QtHelp QtHelp_debug QtHelp4 QtHelpd4  
       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTWEBKIT_LIBRARY NAMES QtWebKit QtWebKit_debug QtWebKit4 
QtWebKitd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY NAMES QtXmlPatterns 
QtXmlPatterns_debug QtXmlPatterns4 QtXmlPatternsd4         PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_PHONON_LIBRARY NAMES phonon phonon4 phonon_debug phonond4  
  PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
-    FIND_LIBRARY(QT_QTDBUS_LIBRARY NAMES QtDBus QtDBus4 QtDBusd4         PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
     IF(MSVC)
       FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE    NAMES QtCore4            PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
@@ -744,7 +929,7 @@
 
   IF( NOT QT_QTCORE_LIBRARY )
     IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
-      MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check 
CMakeFiles/CMakeError.log for more details.")
+      MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check 
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
     ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
   ENDIF( NOT QT_QTCORE_LIBRARY )
 
@@ -752,10 +937,10 @@
   FIND_LIBRARY(QT_QTASSISTANT_LIBRARY NAMES QtAssistantClient 
QtAssistantClient4 QtAssistant QtAssistant4 QtAssistantd4 PATHS 
${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
 
   # Set QT_QTDESIGNER_LIBRARY
-  FIND_LIBRARY(QT_QTDESIGNER_LIBRARY NAMES QtDesigner QtDesigner4 QtDesignerd4 
PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
+  FIND_LIBRARY(QT_QTDESIGNER_LIBRARY NAMES QtDesigner QtDesigner_debug 
QtDesigner4 QtDesignerd4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
 
   # Set QT_QTDESIGNERCOMPONENTS_LIBRARY
-  FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY NAMES QtDesignerComponents 
QtDesignerComponents4 QtDesignerComponentsd4 PATHS ${QT_LIBRARY_DIR}        
NO_DEFAULT_PATH)
+  FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY NAMES QtDesignerComponents 
QtDesignerComponents_debug QtDesignerComponents4 QtDesignerComponentsd4 PATHS 
${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
 
   # Set QT_QTMAIN_LIBRARY
   IF(WIN32)
@@ -802,7 +987,7 @@
     
     IF (QT_${basename}_INCLUDE_DIR)
       #add the include directory to QT_INCLUDES
-      SET(QT_INCLUDES ${QT_INCLUDES} "${QT_${basename}_INCLUDE_DIR}")
+      SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
     ENDIF (QT_${basename}_INCLUDE_DIR)
 
     # Make variables changeble to the advanced user
@@ -828,8 +1013,12 @@
   _QT4_ADJUST_LIB_VARS(QTUITOOLS)
   _QT4_ADJUST_LIB_VARS(QTTEST)
   _QT4_ADJUST_LIB_VARS(QTDBUS)
-  
-  
+  _QT4_ADJUST_LIB_VARS(QTASSISTANTCLIENT)
+  _QT4_ADJUST_LIB_VARS(QTHELP)
+  _QT4_ADJUST_LIB_VARS(QTWEBKIT)
+  _QT4_ADJUST_LIB_VARS(QTXMLPATTERNS)
+  _QT4_ADJUST_LIB_VARS(PHONON)
+
   # platform dependent libraries
   IF(Q_WS_X11)
     _QT4_ADJUST_LIB_VARS(QTMOTIF)
@@ -851,8 +1040,10 @@
   QT_QUERY_QMAKE(QT_MOC_EXECUTABLE_INTERNAL "QMAKE_MOC")
   QT_QUERY_QMAKE(QT_UIC_EXECUTABLE_INTERNAL "QMAKE_UIC")
 
+  # make sure we have / and not \ as qmake gives on windows
   FILE(TO_CMAKE_PATH 
     "${QT_MOC_EXECUTABLE_INTERNAL}" QT_MOC_EXECUTABLE_INTERNAL)
+  # make sure we have / and not \ as qmake gives on windows
   FILE(TO_CMAKE_PATH 
     "${QT_UIC_EXECUTABLE_INTERNAL}" QT_UIC_EXECUTABLE_INTERNAL)
 
@@ -885,6 +1076,18 @@
     NO_DEFAULT_PATH
     )
 
+  FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
+    NAMES lupdate
+    PATHS ${QT_BINARY_DIR}
+    NO_DEFAULT_PATH
+    )
+
+  FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
+    NAMES lrelease
+    PATHS ${QT_BINARY_DIR}
+    NO_DEFAULT_PATH
+    )
+
   IF (QT_MOC_EXECUTABLE)
      SET(QT_WRAP_CPP "YES")
   ENDIF (QT_MOC_EXECUTABLE)
@@ -895,7 +1098,9 @@
 
 
 
-  MARK_AS_ADVANCED( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE 
QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE)
+  MARK_AS_ADVANCED( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE
+    QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE
+    QT_LUPDATE_EXECUTABLE QT_LRELEASE_EXECUTABLE)
 
   ######################################
   #
@@ -903,6 +1108,23 @@
   #
   ######################################
 
+  MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
+    SET(${_qt4_files})
+    SET(${_qt4_options})
+    SET(_QT4_DOING_OPTIONS FALSE)
+    FOREACH(_currentArg ${ARGN})
+      IF ("${_currentArg}" STREQUAL "OPTIONS")
+        SET(_QT4_DOING_OPTIONS TRUE)
+      ELSE ("${_currentArg}" STREQUAL "OPTIONS")
+        IF(_QT4_DOING_OPTIONS) 
+          LIST(APPEND ${_qt4_options} "${_currentArg}")
+        ELSE(_QT4_DOING_OPTIONS)
+          LIST(APPEND ${_qt4_files} "${_currentArg}")
+        ENDIF(_QT4_DOING_OPTIONS)
+      ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
+    ENDFOREACH(_currentArg) 
+  ENDMACRO (QT4_EXTRACT_OPTIONS)
+
   MACRO (QT4_GET_MOC_INC_DIRS _moc_INC_DIRS)
      SET(${_moc_INC_DIRS})
      GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
@@ -910,6 +1132,7 @@
      FOREACH(_current ${_inc_DIRS})
         SET(${_moc_INC_DIRS} ${${_moc_INC_DIRS}} "-I" ${_current})
      ENDFOREACH(_current ${_inc_DIRS})
+
   ENDMACRO(QT4_GET_MOC_INC_DIRS)
 
 
@@ -942,20 +1165,20 @@
 
 
   # QT4_WRAP_CPP(outfiles inputfile ... )
-  # TODO  perhaps add support for -D, -U and other minor options
 
   MACRO (QT4_WRAP_CPP outfiles )
     # get include dirs
     QT4_GET_MOC_INC_DIRS(moc_includes)
+    QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
 
-    FOREACH (it ${ARGN})
+    FOREACH (it ${moc_files})
       GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
       GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
 
       SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/moc_${outfile}.cxx)
       ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
         COMMAND ${QT_MOC_EXECUTABLE}
-        ARGS ${moc_includes} -o ${outfile} ${it}
+        ARGS ${moc_includes} ${moc_options} -o ${outfile} ${it}
         DEPENDS ${it})
       SET(${outfiles} ${${outfiles}} ${outfile})
     ENDFOREACH(it)
@@ -966,14 +1189,15 @@
   # QT4_WRAP_UI(outfiles inputfile ... )
 
   MACRO (QT4_WRAP_UI outfiles )
+    QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
 
-    FOREACH (it ${ARGN})
+    FOREACH (it ${ui_files})
       GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
       GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
       SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
       ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
         COMMAND ${QT_UIC_EXECUTABLE}
-        ARGS -o ${outfile} ${infile}
+        ARGS ${ui_options} -o ${outfile} ${infile}
         MAIN_DEPENDENCY ${infile})
       SET(${outfiles} ${${outfiles}} ${outfile})
     ENDFOREACH (it)
@@ -982,11 +1206,11 @@
 
 
   # QT4_ADD_RESOURCES(outfiles inputfile ... )
-  # TODO  perhaps consider adding support for compression and root options to 
rcc
 
   MACRO (QT4_ADD_RESOURCES outfiles )
+    QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
 
-    FOREACH (it ${ARGN})
+    FOREACH (it ${rcc_files})
       GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
       GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
       GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
@@ -1006,7 +1230,7 @@
       ENDFOREACH(_RC_FILE)
       ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
         COMMAND ${QT_RCC_EXECUTABLE}
-        ARGS -name ${outfilename} -o ${outfile} ${infile}
+        ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
         MAIN_DEPENDENCY ${infile}
         DEPENDS ${_RC_DEPENDS})
       SET(${outfiles} ${${outfiles}} ${outfile})
@@ -1044,7 +1268,8 @@
     MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
   
   ENDMACRO(QT4_ADD_DBUS_INTERFACE)
- 
+  
+  
   MACRO(QT4_ADD_DBUS_INTERFACES _sources)
      FOREACH (_current_FILE ${ARGN})
         GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
@@ -1054,21 +1279,11 @@
         QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
      ENDFOREACH (_current_FILE)
   ENDMACRO(QT4_ADD_DBUS_INTERFACES)
-
-  MACRO(QT4_ADD_DBUS_INTERFACE_NO_NAMESPACE _sources _interface _basename)
-    MESSAGE(SEND_ERROR "QT4_ADD_DBUS_INTERFACE_NO_NAMESPACE() is deprecated. 
Use the following instead:
-SET_SOURCE_FILES_PROPERTIES(<interface> PROPERTIES NO_NAMESPACE TRUE)
-QT4_ADD_DBUS_INTERFACE(<srcList> <interface> <basename>)\n")
-  ENDMACRO(QT4_ADD_DBUS_INTERFACE_NO_NAMESPACE)
-
-  MACRO(QT4_ADD_DBUS_INTERFACES_NO_NAMESPACE _sources)
-    MESSAGE(SEND_ERROR "QT4_ADD_DBUS_INTERFACES_NO_NAMESPACE() is deprecated. 
Use the following instead:
-SET_SOURCE_FILES_PROPERTIES(<files> PROPERTIES NO_NAMESPACE TRUE)
-QT4_ADD_DBUS_INTERFACES(<srcList> <files>)\n")
-  ENDMACRO(QT4_ADD_DBUS_INTERFACES_NO_NAMESPACE)
   
-  MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName )
-    SET(_customName "${ARGV1}")
+  
+  MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some 
-options )
+    QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN})
+
     GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE)
     GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE)
     
@@ -1079,7 +1294,7 @@
     ENDIF (_customName)
   
     ADD_CUSTOM_COMMAND(OUTPUT ${_target}
-        COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_in_file} > ${_target}
+        COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} 
> ${_target}
         DEPENDS ${_in_file}
     )
   ENDMACRO(QT4_GENERATE_DBUS_INTERFACE)
@@ -1128,7 +1343,7 @@
 
          GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
          # if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
-         # here. this is required to make bouic work correctly:
+         # This is required to make uic work correctly:
          # we need to add generated .cpp files to the sources (to compile 
them),
          # but we cannot let automoc handle them, as the .cpp files don't 
exist yet when
          # cmake is run for the very first time on them -> however the .cpp 
files might
@@ -1176,11 +1391,7 @@
   IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND 
QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
     SET( QT4_FOUND "YES" )
     IF( NOT Qt4_FIND_QUIETLY)
-      IF (WIN32)
-        MESSAGE(STATUS "Found Qt-Version ${QTVERSION} with qmake at 
${QT_QMAKE_EXECUTABLE}")
-      ELSE (WIN32)
-        MESSAGE(STATUS "Found Qt-Version ${QTVERSION}")
-      ENDIF (WIN32)
+      MESSAGE(STATUS "Found Qt-Version ${QTVERSION} (using 
${QT_QMAKE_EXECUTABLE})")
     ENDIF( NOT Qt4_FIND_QUIETLY)
   ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND 
QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
     SET( QT4_FOUND "NO")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qimageblitz-0.0.4/test/CMakeLists.txt 
new/qimageblitz-0.0.6/test/CMakeLists.txt
--- old/qimageblitz-0.0.4/test/CMakeLists.txt   2007-11-07 12:58:44.000000000 
+0100
+++ new/qimageblitz-0.0.6/test/CMakeLists.txt   2010-07-28 20:06:14.000000000 
+0200
@@ -4,11 +4,6 @@
  set(CMAKE_DEBUG_POSTFIX "d")
 endif (WIN32)
 
-if (APPLE)
- set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
- set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
-endif (APPLE)
-
 include_directories(
 ${CMAKE_SOURCE_DIR}
 ${blitztest_BINARY_DIR}
@@ -22,6 +17,10 @@
 
 qt4_automoc(${blitztest_SRCS}) 
 
+if(COMMAND cmake_policy)
+  cmake_policy(SET CMP0003 NEW)
+endif(COMMAND cmake_policy) 
+
 add_executable(blitztest ${blitztest_SRCS})
 
 target_link_libraries(blitztest ${QT_QTCORE_LIBRARY}


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to