Adding a special case were unix machines will enforce unix line endings. Doing this on windows is a bad idea, read the note in astyle.cmake

--- cmake/Programs/astyle.cmake
+++ cmake/Programs/astyle.cmake
@@ -1,5 +1,13 @@
 # Find the program
 find_program(astyle_EXECUTABLE astyle DOC "A tool to stylize the code.")
+
+# Enforce linux line endings if on a Unix machine
+# Note: Doing this on windows is a bad idea! Some git configurations checkout as windows line
+#       endings and check in as unix. Converting everything to unix with that configuration marks
+#       every file as a change and is a huge pain...
+if(UNIX AND NOT CYGWIN)
+    set(__LINEENDINGS "--lineend=windows")
+endif()

 # Add a custom target
 add_custom_target("style" COMMAND
@@ -8,5 +16,6 @@
   ${CMAKE_CURRENT_SOURCE_DIR}/src/Jatta/*.cpp
   ${CMAKE_CURRENT_SOURCE_DIR}/src/Jatta/*.h
   ${CMAKE_CURRENT_SOURCE_DIR}/src/Jatta/*.mm
+  ${__LINEENDINGS}
   VERBATIM
 )


Set CMAKE_POSITION_INDEPENDENT_CODE to TRUE as a CMake option

Setting CMAKE_POSITION_INDEPENDENT_CODE to true via an option
simplify changing the value CMAKE_POSITION_INDEPENDENT_CODE for an
external user, for example if  it is cross-compiling iDynTree as static library for
a target that does not support position independent code.

--- cmake/iDynTreeOptions.cmake
+++ cmake/iDynTreeOptions.cmake
@@ -13,7 +13,7 @@

 #########################################################################
 # Use position indipendent code
-set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+option(CMAKE_POSITION_INDEPENDENT_CODE "When compiling static libraries generate position independent code" TRUE)

 #########################################################################
 # Turn on testing.


[CMake] Split -gx strip flag into -g -x

[CMake] Split -gx strip flag into -g -x

llvm-strip doesn't handle -gx spelling, so we need to split these
as two separate flags.

Differential Revision: https://reviews.llvm.org/D50684

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@339639 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1566,7 +1566,7 @@
       endif()
       set(strip_command COMMAND ${CMAKE_STRIP} -Sxl $<TARGET_FILE:${name}>)
     else()
-      set(strip_command COMMAND ${CMAKE_STRIP} -gx $<TARGET_FILE:${name}>)
+      set(strip_command COMMAND ${CMAKE_STRIP} -g -x $<TARGET_FILE:${name}>)
     endif()
   endif()


update Linux cmake file

update Linux cmake file

--- cmake_modules/FindZWO.cmake
+++ cmake_modules/FindZWO.cmake
@@ -30,12 +30,12 @@
   endif()

   # JM: Packages from different distributions have different suffixes
-  find_path(ZWO_INCLUDE_DIR ASICamera.h
+  find_path(ZWO_INCLUDE_DIR ASICamera2.h
     PATHS
     ${PROJECT_SOURCE_DIR}/cameras
   )

-  find_library(ZWO_LIBRARIES NAMES ASICamera
+  find_library(ZWO_LIBRARIES NAMES ASICamera2
     PATHS
     ${PROJECT_SOURCE_DIR}/cameras/zwolibs
     PATH_SUFFIXES ${arch}


Fix dashboard notes submission

Fix dashboard notes submission

--- scripts/dashboard/adios_common.cmake
+++ scripts/dashboard/adios_common.cmake
@@ -71,8 +71,8 @@
 if(NOT DEFINED CTEST_TEST_TIMEOUT)
   set(CTEST_TEST_TIMEOUT 300)
 endif()
-if(NOT ADIOS_CTEST_SUBMIT_NOTES)
-  set(ADIOS_CTEST_SUBMIT_NOTES TRUE)
+if(NOT DEFINED CTEST_SUBMIT_NOTES)
+  set(CTEST_SUBMIT_NOTES TRUE)
 endif()
 if(NOT dashboard_root_name)
   set(dashboard_root_name "Builds/My Tests")


Correction of the previous wrong commit.

--- salome_adm/cmake_files/FindSalomeBoost.cmake
+++ salome_adm/cmake_files/FindSalomeBoost.cmake
@@ -32,7 +32,7 @@
   # Under windows, one extra sub-directory in the boost installation hierarchy:
   SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 2)
 ELSE()
-  SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 2)
+  SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 1)
 ENDIF()
 IF(Boost_FOUND OR BOOST_FOUND)
    MESSAGE(STATUS "Boost include dirs is: ${Boost_INCLUDE_DIRS}")


Minor release preparation

Minor release preparation

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[ ] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- FindEqualizer.cmake
+++ FindEqualizer.cmake
@@ -76,6 +76,7 @@
 endif()
 if(Equalizer_FIND_VERSION)
   # Matching Collage versions
+  set(_eq_coVersion_1.2.0 "0.4.8")
   set(_eq_coVersion_1.1.7 "0.4.7")
   set(_eq_coVersion_1.1.6 "0.4.1")
   set(_eq_coVersion_1.1.5 "0.4.1")


Small improvement of SALOME_PACKAGE_REPORT() macro: justify package names

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -248,11 +248,35 @@
 ENDMACRO(SALOME_UPDATE_FLAG_AND_LOG_PACKAGE)

 ####
+# SALOME_JUSTIFY_STRING()
+#
+# Justifies the string specified as an argument to the given length
+# adding required number of spaces to the end. Does noting if input
+# string is longer as required length.
+# Puts the result to the output variable.
+MACRO(SALOME_JUSTIFY_STRING input length result)
+  SET(${result} ${input})
+  STRING(LENGTH ${input} _input_length)
+  MATH(EXPR _nb_spaces "${length}-${_input_length}-1")
+  IF (_nb_spaces GREATER 0)
+    FOREACH(_idx RANGE ${_nb_spaces})
+      SET(${result} "${${result}} ")
+    ENDFOREACH()
+  ENDIF()
+ENDMACRO(SALOME_JUSTIFY_STRING)
+
+####
 # SALOME_PACKAGE_REPORT()
 #
 # Print a quick summary of the detection of optional prerequisites.
 #
 MACRO(SALOME_PACKAGE_REPORT)
+  PARSE_ARGUMENTS(SALOME_PACKAGE_REPORT "LENGTH" "" ${ARGN})
+  IF(SALOME_PACKAGE_REPORT_LENGTH)
+    SET(_length ${SALOME_PACKAGE_REPORT_LENGTH})
+  ELSE()
+    SET(_length 10)
+  ENDIF()
   MESSAGE(STATUS "")
   MESSAGE(STATUS "  Optional packages - Detection report ")
   MESSAGE(STATUS "  ==================================== ")
@@ -264,6 +288,7 @@
     LIST(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)
     LIST(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)
     LIST(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)
+    SALOME_JUSTIFY_STRING(${_pkg_name} ${_length} _pkg_name)
     IF(_pkg_found)
       SET(_found_msg "Found")
       SET(_flag_msg "")


Correct the APXS module name during install

The module is named websocket_module, not websocket_module_module.

--- cmake/CMakeUnix.cmake
+++ cmake/CMakeUnix.cmake
@@ -24,7 +24,7 @@
 ## Install Targets using apxs
 INSTALL(CODE "
   EXECUTE_PROCESS(COMMAND
-    ${APACHE_APXS_EXECUTABLE} -i -A -n \"websocket_module\" mod_websocket.so
+    ${APACHE_APXS_EXECUTABLE} -i -A -n \"websocket\" mod_websocket.so
   )
 ")


Fix the variable name for the TESTVAR

Fix the variable name for the TESTVAR

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -180,7 +180,7 @@
             set(${var} "NOTFOUND" CACHE STRING "${var}-docstring" FORCE)
         endforeach(var)
     endif ()
-    set(${TESTVAR}_INT_CHECK ${${TESTVAR}} CACHE INTERNAL "${testvar}-docstring" FORCE)
+    set(${TESTVAR}_INT_CHECK ${${TESTVAR}} CACHE INTERNAL "${TESTVAR}-docstring" FORCE)
 endmacro(clear_if_changed)

 ################################################################################


Added updates to UseCython.cmake

Added updates to UseCython.cmake

--- cmake/UseCython.cmake
+++ cmake/UseCython.cmake
@@ -203,7 +203,7 @@
   endforeach()

   # Determining generated file name.
-  set( _generated_file "${_name}.${extension}" )
+  set( _generated_file "${CMAKE_CURRENT_BINARY_DIR}/${_name}.${extension}" )
   set_source_files_properties( ${_generated_file} PROPERTIES GENERATED TRUE )
   set( ${generated_file} ${_generated_file} PARENT_SCOPE )


Enable ASAN build and test on AArch64

Enable ASAN build and test on AArch64

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@229665 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -197,7 +197,7 @@
 filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
   x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mips64 mipsel mips64el)
 filter_available_targets(ASAN_SUPPORTED_ARCH
-  x86_64 i386 i686 powerpc64 powerpc64le arm mips mipsel mips64 mips64el)
+  x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mipsel mips64 mips64el)
 filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)
 filter_available_targets(LSAN_SUPPORTED_ARCH x86_64)
 # LSan common files should be available on all architectures supported


Set a different var for checking I686, because LLVM_NATIVE_ARCH is
overwritten.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@309177 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -159,7 +159,7 @@
   find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
   set(LLVM_LIBXML2_ENABLED 0)
   set(LIBXML2_FOUND 0)
-  if((LLVM_ENABLE_LIBXML2) AND (CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) AND (NOT LLVM_NATIVE_ARCH MATCHES "i686"))
+  if((LLVM_ENABLE_LIBXML2) AND (CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) AND (NOT LLVM_ARCH_I686))
     find_package(LibXml2)
     if (LIBXML2_FOUND)
       set(LLVM_LIBXML2_ENABLED 1)
@@ -382,6 +382,10 @@
 if( LLVM_NATIVE_ARCH STREQUAL "host" )
   string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_HOST_TRIPLE})
 endif ()
+
+set(LLVM_ARCH_I686 0)
+if (LLVM_NATIVE_ARCH MATCHES "i686")
+  set(LLVM_ARCH_I686 1)

 if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86")
   set(LLVM_NATIVE_ARCH X86)


exclude global_tests from CPACK_COMPONENTS_ALL

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@1053 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -54,11 +54,15 @@
 macro(PCL_CPACK_MAKE_COMPS_OPTS _var _current)
     set(_comps_list)
     foreach(_ss ${PCL_SUBSYSTEMS})
-        PCL_GET_SUBSYS_STATUS(_status ${_ss})
-        if(_status)
-            set(_comps_list "${_comps_list} ${_ss}")
-            PCL_CPACK_ADD_COMP_INFO(${_var} ${_ss})
-        endif(_status)
+        if("${_ss}" STREQUAL "global_tests")
+            # we don't install global_tests
+        else("${_ss}" STREQUAL "global_tests")
+            PCL_GET_SUBSYS_STATUS(_status ${_ss})
+            if(_status)
+                set(_comps_list "${_comps_list} ${_ss}")
+                PCL_CPACK_ADD_COMP_INFO(${_var} ${_ss})
+            endif(_status)
+        endif("${_ss}" STREQUAL "global_tests")
     endforeach(_ss)
     set(${_var} "${${_var}}\nset(CPACK_COMPONENTS_ALL${_comps_list})\n")
 endmacro(PCL_CPACK_MAKE_COMPS_OPTS)


fix build error

fix build error

--- external/ImportExternalLibraries.cmake
+++ external/ImportExternalLibraries.cmake
@@ -293,7 +293,7 @@
 ln_make_external_find_path(pcre_ROOT "pcre")

 find_library(pcre_LIBRARY_RELEASE NAMES pcre2-16 libpcre2-16 PATHS ${pcre_ROOT} PATH_SUFFIXES lib NO_CMAKE_SYSTEM_PATH)
-find_library(pcre_LIBRARY_DEBUG NAMES pcre2-16 libpcre2-16 PATHS ${pcre_ROOT} PATH_SUFFIXES lib NO_CMAKE_SYSTEM_PATH)
+find_library(pcre_LIBRARY_DEBUG NAMES pcre2-16d pcre2-16 libpcre2-16 PATHS ${pcre_ROOT} PATH_SUFFIXES lib NO_CMAKE_SYSTEM_PATH)

 add_library(pcre STATIC IMPORTED)
 set_target_properties(pcre PROPERTIES IMPORTED_LOCATION_RELEASE "${pcre_LIBRARY_RELEASE}")


cmake: Update ITKv4 removing unused support for building FFTWF and FFTWD

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -48,43 +48,8 @@
       -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
   endif()

-  ### --- Project specific additions here
-  if(${PROJECT_NAME}_BUILD_FFTWF_SUPPORT)
-    set(${proj}_FFTWF_ARGS
-      -DITK_USE_FFTWF:BOOL=ON
-      )
-  endif()
-  if(${PROJECT_NAME}_BUILD_FFTWD_SUPPORT)
-    set(${proj}_FFTWD_ARGS
-      -DITK_USE_FFTWD:BOOL=ON
-      )
-  endif()
-
   # Include dependent projects if any
   SlicerMacroCheckExternalProjectDependency(${proj})
-
-  set(${proj}_WRAP_ARGS)
-  #if(foo)
-    #set(${proj}_WRAP_ARGS
-    #  -DINSTALL_WRAP_ITK_COMPATIBILITY:BOOL=OFF
-    #  -DWRAP_float:BOOL=ON
-    #  -DWRAP_unsigned_char:BOOL=ON
-    #  -DWRAP_signed_short:BOOL=ON
-    #  -DWRAP_unsigned_short:BOOL=ON
-    #  -DWRAP_complex_float:BOOL=ON
-    #  -DWRAP_vector_float:BOOL=ON
-    #  -DWRAP_covariant_vector_float:BOOL=ON
-    #  -DWRAP_rgb_signed_short:BOOL=ON
-    #  -DWRAP_rgb_unsigned_char:BOOL=ON
-    #  -DWRAP_rgb_unsigned_short:BOOL=ON
-    #  -DWRAP_ITK_TCL:BOOL=OFF
-    #  -DWRAP_ITK_JAVA:BOOL=OFF
-    #  -DWRAP_ITK_PYTHON:BOOL=ON
-    #  -DPYTHON_EXECUTABLE:PATH=${${CMAKE_PROJECT_NAME}_PYTHON_EXECUTABLE}
-    #  -DPYTHON_INCLUDE_DIR:PATH=${${CMAKE_PROJECT_NAME}_PYTHON_INCLUDE}
-    #  -DPYTHON_LIBRARY:FILEPATH=${${CMAKE_PROJECT_NAME}_PYTHON_LIBRARY}
-    #  )
-  #endif()

   # HACK This code fixes a loony problem with HDF5 -- it doesn't
   #      link properly if -fopenmp is used.
@@ -103,10 +68,6 @@
       -DKWSYS_USE_MD5:BOOL=ON # Required by SlicerExecutionModel
       -DITK_WRAPPING:BOOL=OFF #${BUILD_SHARED_LIBS} ## HACK:  QUICK CHANGE
       -DModule_MGHIO:BOOL=ON  # Allow building of the MGHIO classes
-      ${${proj}_DCMTK_ARGS}
-      ${${proj}_WRAP_ARGS}
-      ${${proj}_FFTWF_ARGS}
-      ${${proj}_FFTWD_ARGS}
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)


BUG: updating ITK_DIR install path for version 4.1

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -13,7 +13,7 @@

 set(proj ITK)  ## Use ITK convention of calling it ITK
 set(ITK_REPOSITORY git://itk.org/ITK.git)
-set(ITK_DIR ${CMAKE_INSTALL_PREFIX}/lib/cmake/ITK-4.0)
+set(ITK_DIR ${CMAKE_INSTALL_PREFIX}/lib/cmake/ITK-4.1)
 set(ITK_TAG_COMMAND GIT_TAG d7e88542006581d855d34fead3b0a76665d860bc ) # Tue Dec 27 nightly-master
 set(WrapITK_DIR ${CMAKE_INSTALL_PREFIX}/lib/cmake/ITK-4.0/WrapITK)


SVN_SILENT made messages (.desktop file)

--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -13,7 +13,7 @@
 Name[ca@valencia]=DirectShow9
 Name[cs]=DirectShow9
 Name[da]=DirectShow9
-Name[de]=DirectShow 9
+Name[de]=DirectShow9
 Name[es]=DirectShow9
 Name[et]=DirectShow9
 Name[hu]=DirectShow9
@@ -38,7 +38,7 @@
 Comment[ca@valencia]=Dorsal DirectShow9 del Phonon
 Comment[cs]=Podpůrná vrstva DirectShow9 pro Phonon
 Comment[da]=Phonon DirectShow9-motor
-Comment[de]=Phonon-Back-End für DirectShow 9
+Comment[de]=Phonon-Treiber für DirectShow9
 Comment[es]=Motor DirectShow9 para Phonon
 Comment[et]=Phononi DirectShow9 taustaprogramm
 Comment[hu]=Phonon DirectShow9-modul


remove whitespace

remove whitespace

--- modules/FindMako.cmake
+++ modules/FindMako.cmake
@@ -6,7 +6,7 @@
   endif()
 endif()
 # If mako was installed by this process previously, check that it is still there
-if(MAKO_EXTERNAL_INSTALL)
+if(MAKO_EXTERNAL_INSTALL)
   execute_process(
     COMMAND ${PYTHON_EXECUTABLE} "-c \"import mako\""
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external/python
@@ -21,7 +21,7 @@
 # If mako is not found ...
 if(NOT FOUND_MAKO)
   # Then look for it by importing it
-  execute_process(
+  execute_process(
     COMMAND ${PYTHON_EXECUTABLE} -c "import mako"
     ERROR_VARIABLE DUMMY
     OUTPUT_VARIABLE DUMMY
@@ -30,7 +30,7 @@
   if(FOUND_MAKO EQUAL 0)
     message(STATUS "[Mako] Found")
     set(FOUND_MAKO TRUE CACHE INTERNAL "Found mako python package")
-    set(MAKO_EXTERNAL_INSTALL FALSE CACHE INTERNAL "Manual install of mako")
+    set(MAKO_EXTERNAL_INSTALL FALSE CACHE INTERNAL "Manual install of mako")
     return()
   endif()
 else()
@@ -39,7 +39,7 @@
   return()
 endif()

-message(STATUS "[Mako] Not found")
+message(STATUS "[Mako] Not found")
 # Now try and install mako using pip
 if(NOT PIP_EXECUTABLE)
   find_program(PIP_EXECUTABLE pip)
@@ -67,7 +67,7 @@
   message(STATUS "[Mako] installed in ${PROJECT_BINARY_DIR}/external/python")
 endif()

-execute_process(
+execute_process(
   COMMAND ${PYTHON_EXECUTABLE} -c "import mako"
   WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external/python
   ERROR_VARIABLE DUMMY
@@ -77,7 +77,7 @@
 if(FOUND_MAKO EQUAL 0)
   message(STATUS "[Mako] now available in build directory")
   set(FOUND_MAKO TRUE CACHE INTERNAL "Found mako python package")
-  set(MAKO_EXTERNAL_INSTALL TRUE CACHE INTERNAL "Manual install of mako")
+  set(MAKO_EXTERNAL_INSTALL TRUE CACHE INTERNAL "Manual install of mako")
   return()
 else()
   message(FATAL_ERROR "Could not install mako")


Fix `clang` warning flags

Fix `clang` warning flags

--- cmake/ApplyStrictCompileOptions.cmake
+++ cmake/ApplyStrictCompileOptions.cmake
@@ -1,8 +1,6 @@
 macro (apply_strict_compile_options_to_this_directory)
-	if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+	if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 		set_property(DIRECTORY PROPERTY COMPILE_OPTIONS -Wall -Wextra -Wpedantic -Werror)
-	elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-		set_property(DIRECTORY PROPERTY COMPILE_OPTIONS -Wall -Wextra -pedantic -Werror)
 	elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
 		set_property(DIRECTORY PROPERTY COMPILE_OPTIONS /W4 /wd4244 /wd4805 /wd4389 /wd4267 /WX)
 	endif ()


[t:5136] add "NVALGRIND=1" to COMPILE_DEFINITIONS_RELEASE

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@44902 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -73,6 +73,8 @@
     set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ip -ipo1")
   endif ()
 endif ()
+## but we do want -DNVALGRIND
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NVALGRIND=1)

 if (CMAKE_C_COMPILER_ID MATCHES Intel)
   ## make sure intel libs are linked statically


[t:4846] merging 4846 branch.

[t:4846] merging 4846 branch.

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@43235 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -103,6 +103,8 @@
   string(REGEX REPLACE ";" "," intel_warning_string "${intel_warnings}")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -diag-disable ${intel_warning_string}")

-  # make sure to link with both intel's math library and regular -lm
-  link_libraries(imf m)
+  # make sure intel libs are linked statically
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-intel")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-intel")
+  set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-intel")
 endif()


raised minimum API level for Android

raised minimum API level for Android

--- cmake_modules/android.toolchain.cmake
+++ cmake_modules/android.toolchain.cmake
@@ -216,7 +216,7 @@
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

 # NDK search paths
-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r13 -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if( NOT DEFINED ANDROID_NDK_SEARCH_PATHS )
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -239,7 +239,7 @@
 set( ANDROID_SUPPORTED_ABIS_mips64 "mips64" )

 # API level defaults
-set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_arm64 21 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86_64 21 )


--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -10,6 +10,10 @@
 Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Sipe.
 Comment[sk]=Vlastné používateľské rozhranie konfigurácie účtu pre účty používajúce správcu pripojení Sipe.
 Comment[sl]=Uporabniški vmesnik za prilagoditev računov, ki uporabljajo upravljalnik povezav Sipe.
+Comment[sr]=Корисничко сучеље за подешавање посебних налога под менаџером везе Сајп.
+Comment[sr@ijekavian]=Корисничко сучеље за подешавање посебних налога под менаџером везе Сајп.
+Comment[sr@ijekavianlatin]=Korisničko sučelje za podešavanje posebnih naloga pod menadžerom veze SIPE.
+Comment[sr@latin]=Korisničko sučelje za podešavanje posebnih naloga pod menadžerom veze SIPE.
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Sipe.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікового запису за допомогою керування з’єднаннями sipe.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the sipe connection manager.xx
@@ -24,6 +28,10 @@
 Name[pt_BR]=Interface de configuração de contas do Sipe
 Name[sk]=Používateľské rozhranie konfigurácie účtu Sipe
 Name[sl]=Uporabniški vmesnik za nastavitev računov Sipe
+Name[sr]=Корисничко сучеље за подешавање налога под Сајпом
+Name[sr@ijekavian]=Корисничко сучеље за подешавање налога под Сајпом
+Name[sr@ijekavianlatin]=Korisničko sučelje za podešavanje naloga pod SIPE‑om
+Name[sr@latin]=Korisničko sučelje za podešavanje naloga pod SIPE‑om
 Name[sv]=Användargränssnitt för inställning av Sipe-konton
 Name[uk]=Інтерфейс користувача для налаштовування sipe
 Name[x-test]=xxSipe Account Configuration User Interfacexx


Added C++ runtime search for standalone toolchain

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -813,9 +813,8 @@
  else()
   message( FATAL_ERROR "Unknown runtime: ${ANDROID_STL}" )
  endif()
-
+ # find libsupc++.a - rtti & exceptions
  if( ANDROID_STL STREQUAL "system_re" OR ANDROID_STL MATCHES "gnustl" )
-  # find libsupc++.a
   if( ANDROID_NDK_RELEASE STRGREATER "r8" ) # r8b
    set( __libsupcxx "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" )
   elseif( NOT ANDROID_NDK_RELEASE STRLESS "r7" AND ANDROID_NDK_RELEASE STRLESS "r8b")
@@ -853,21 +852,47 @@
   else()
    list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" )
   endif()
- endif()
- #set( __stlLibPath "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib" )
- #TODO: configure stl
-endif()
-
-# case of shared STL version
+  # always search static GNU STL to get the location of libsupc++.a
+  if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" )
+   set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb" )
+  elseif( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" )
+   set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}" )
+  elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libstdc++.a" )
+   set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb" )
+  elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libstdc++.a" )
+   set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib" )
+  endif()
+  if( __libstl )
+   set( __libsupcxx "${__libstl}/libsupc++.a" )
+   set( __libstl    "${__libstl}/libstdc++.a" )
+  endif()
+  if( NOT EXISTS "${__libsupcxx}" )
+   message( FATAL_ERROR "TODO: missing stdsupc++ in NDK r7 error" )
+  endif()
+  if( ANDROID_STL STREQUAL "gnustl_shared" )
+   if( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )
+    set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" )
+   elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" )
+    set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" )
+   elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" )
+    set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" )
+   endif()
+  endif()
+ endif()
+endif()
+
+# case of shared STL linkage
 if( ANDROID_STL MATCHES "shared" AND DEFINED __libstl )
  string( REPLACE "_static.a" "_shared.so" __libstl "${__libstl}" )
- get_filename_component( __libstlname "${__libstl}" NAME )
- execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess )
- if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}")
-  message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" )
- endif()
- unset( __fileCopyProcess )
- unset( __libstlname )
+ if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" )
+  get_filename_component( __libstlname "${__libstl}" NAME )
+  execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess )
+  if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}")
+   message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" )
+  endif()
+  unset( __fileCopyProcess )
+  unset( __libstlname )
+ endif()
 endif()

 # ccache support
@@ -889,7 +914,7 @@
  set( CMAKE_C_COMPILER   "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"    CACHE PATH "gcc" )
  set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}"    CACHE PATH "g++" )
 endif()
-set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"     CACHE PATH "Assembler" )
+set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"     CACHE PATH "assembler" )
 if( CMAKE_VERSION VERSION_LESS 2.8.5 )
  set( CMAKE_ASM_COMPILER_ARG1 "-c" )
 endif()
@@ -911,6 +936,9 @@
 endif()

 # flags and definitions
+remove_definitions( -DANDROID )
+add_definitions( -DANDROID )
+
 if(ANDROID_SYSROOT MATCHES "[ ;\"]")
  set( ANDROID_CXX_FLAGS "--sysroot=\"${ANDROID_SYSROOT}\"" )
  if( NOT _CMAKE_IN_TRY_COMPILE )
@@ -920,9 +948,6 @@
 else()
  set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" )
 endif()
-
-remove_definitions( -DANDROID )
-add_definitions( -DANDROID )

 # Force set compilers because standard identification works badly for us
 include( CMakeForceCompiler )
@@ -1018,26 +1043,27 @@
 endif()

 # STL
-if( EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}" )
- set( CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
- set( CMAKE_CXX_CREATE_SHARED_MODULE  "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
- set( CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER>  <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS>  -o <TARGET> <LINK_LIBRARIES>" )
+if( 0 AND EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}" )
+ # use gcc as a C++ linker to avoid automatic picking of libsdtc++
+ set( CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ set( CMAKE_CXX_CREATE_SHARED_MODULE  "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ set( CMAKE_CXX_LINK_EXECUTABLE       "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" )
  if( EXISTS "${__libstl}" )
   set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libstl}\"")
   set( CMAKE_CXX_CREATE_SHARED_MODULE  "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libstl}\"")
-  set( CMAKE_CXX_LINK_EXECUTABLE  "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libstl}\"")
+  set( CMAKE_CXX_LINK_EXECUTABLE       "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libstl}\"")
  endif()
  if( EXISTS "${__libsupcxx}" )
   set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"")
   set( CMAKE_CXX_CREATE_SHARED_MODULE  "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libsupcxx}\"")
-  set( CMAKE_CXX_LINK_EXECUTABLE  "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libsupcxx}\"")
+  set( CMAKE_CXX_LINK_EXECUTABLE       "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libsupcxx}\"")
   # C objects:
-  set( CMAKE_C_CREATE_SHARED_LIBRARY = "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
-  set( CMAKE_C_CREATE_SHARED_MODULE = "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
-  set( CMAKE_C_LINK_EXECUTABLE = "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS>  -o <TARGET> <LINK_LIBRARIES>" )
+  set( CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+  set( CMAKE_C_CREATE_SHARED_MODULE  "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+  set( CMAKE_C_LINK_EXECUTABLE       "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" )
   set( CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"")
   set( CMAKE_C_CREATE_SHARED_MODULE  "${CMAKE_C_CREATE_SHARED_MODULE} \"${__libsupcxx}\"")
-  set( CMAKE_C_LINK_EXECUTABLE  "${CMAKE_C_LINK_EXECUTABLE} \"${__libsupcxx}\"")
+  set( CMAKE_C_LINK_EXECUTABLE       "${CMAKE_C_LINK_EXECUTABLE} \"${__libsupcxx}\"")
  endif()
 endif()

@@ -1098,9 +1124,6 @@
 set( CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "linker flags" )
 set( CMAKE_MODULE_LINKER_FLAGS "" CACHE STRING "linker flags" )
 set( CMAKE_EXE_LINKER_FLAGS "-Wl,-z,nocopyreloc" CACHE STRING "linker flags" )
-
-include_directories( SYSTEM ${ANDROID_STL_INCLUDE_DIRS} ) #"${ANDROID_SYSROOT}/usr/include"
-link_directories( "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" )

 # finish flags
 set( ANDROID_CXX_FLAGS    "${ANDROID_CXX_FLAGS}"    CACHE INTERNAL "Extra Android compiler flags" )
@@ -1136,6 +1159,13 @@
   set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions" )
  endif()
 endif()
+
+# global includes and link directories
+if( ANDROID_STL_INCLUDE_DIRS )
+ include_directories( SYSTEM ${ANDROID_STL_INCLUDE_DIRS} )
+endif()
+link_directories( "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" )
+

 # set these global flags for cmake client scripts to change behavior
 set( ANDROID True )


removed again accidentally added findqt.cmake file

--- contrib/FindQt4.cmake
+++ contrib/FindQt4.cmake
@@ -1,1186 +0,0 @@
-# - Find QT 4
-# 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.
-# The variable QT_USE_FILE is set which is the path to a CMake file that can be included
-# to compile Qt 4 applications and libraries.  It sets up the compilation
-# environment for include directories, preprocessor defines and populates a
-# QT_LIBRARIES variable.
-#
-# Typical usage could be something like:
-#   find_package(Qt4 4.4.3 REQUIRED QtCore QtGui QtXml)
-#   include(${QT_USE_FILE})
-#   add_executable(myexe main.cpp)
-#   target_link_libraries(myexe ${QT_LIBRARIES})
-#
-# The minimum required version can be specified using the standard find_package()-syntax
-# (see example above).
-# For compatibility with older versions of FindQt4.cmake it is also possible to
-# set the variable QT_MIN_VERSION to the minimum required version of Qt4 before the
-# find_package(Qt4) command.
-# If both are used, the version used in the find_package() command overrides the
-# one from QT_MIN_VERSION.
-#
-# When using the components argument, QT_USE_QT* variables are automatically set
-# for the QT_USE_FILE to pick up.  If one wishes to manually set them, the
-# available ones to set include:
-#                    QT_DONT_USE_QTCORE
-#                    QT_DONT_USE_QTGUI
-#                    QT_USE_QT3SUPPORT
-#                    QT_USE_QTASSISTANT
-#                    QT_USE_QAXCONTAINER
-#                    QT_USE_QAXSERVER
-#                    QT_USE_QTDESIGNER
-#                    QT_USE_QTMOTIF
-#                    QT_USE_QTMAIN
-#                    QT_USE_QTMULTIMEDIA
-#                    QT_USE_QTNETWORK
-#                    QT_USE_QTNSPLUGIN
-#                    QT_USE_QTOPENGL
-#                    QT_USE_QTSQL
-#                    QT_USE_QTXML
-#                    QT_USE_QTSVG
-#                    QT_USE_QTTEST
-#                    QT_USE_QTUITOOLS
-#                    QT_USE_QTDBUS
-#                    QT_USE_QTSCRIPT
-#                    QT_USE_QTASSISTANTCLIENT
-#                    QT_USE_QTHELP
-#                    QT_USE_QTWEBKIT
-#                    QT_USE_QTXMLPATTERNS
-#                    QT_USE_PHONON
-#                    QT_USE_QTSCRIPTTOOLS
-#                    QT_USE_QTDECLARATIVE
-#
-#  QT_USE_IMPORTED_TARGETS
-#        If this variable is set to TRUE, FindQt4.cmake will create imported
-#        library targets for the various Qt libraries and set the
-#        library variables like QT_QTCORE_LIBRARY to point at these imported
-#        targets instead of the library file on disk. This provides much better
-#        handling of the release and debug versions of the Qt libraries and is
-#       also always backwards compatible, except for the case that dependencies
-#       of libraries are exported, these will then also list the names of the
-#       imported targets as dependency and not the file location on disk. This
-#       is much more flexible, but requires that FindQt4.cmake is executed before
-#       such an exported dependency file is processed.
-#
-# 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 ... OPTIONS ...)
-#        create moc code from a list of files containing Qt class with
-#        the Q_OBJECT declaration.  Per-direcotry preprocessor definitions
-#        are also added.  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
-#        given basename from the given interface xml file and add it to
-#        the list of sources
-#
-#  macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
-#        create the interface header and implementation files
-#        for all listed interface xml files
-#        the name will be automatically determined from the name of the xml file
-#
-#  macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
-#        create a dbus adaptor (header and implementation file) from the xml file
-#        describing the interface, and add it to the list of sources. The adaptor
-#        forwards the calls to a parent class, defined in parentheader and named
-#        parentclassname. The name of the generated files will be
-#        <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
-#        If <classname> is provided, then it will be used as the classname of the
-#        adaptor itself.
-#
-#  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 qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help"
-#
-#  macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ...
-#                                ts_files ... OPTIONS ...)
-#        out: qm_files
-#        in:  directories sources ts_files
-#        options: flags to pass to lupdate, such as -extensions to specify
-#        extensions for a directory scan.
-#        generates commands to create .ts (vie lupdate) and .qm
-#        (via lrelease) - files from directories and/or sources. The ts files are
-#        created and/or updated in the source tree (unless given with full paths).
-#        The qm files are generated in the build tree.
-#        Updating the translations can be done by adding the qm_files
-#        to the source list of your library/executable, so they are
-#        always updated, or by adding a custom target to control when
-#        they get updated/generated.
-#
-#  macro QT4_ADD_TRANSLATION( qm_files ts_files ... )
-#        out: qm_files
-#        in:  ts_files
-#        generates commands to create .qm from .ts - files. The generated
-#        filenames can be found in qm_files. The ts_files
-#        must exists and are not updated in any way.
-#
-#
-#  Below is a detailed list of variables that FindQt4.cmake sets.
-#  QT_FOUND         If false, don't try to use Qt.
-#  QT4_FOUND        If false, don't try to use Qt 4.
-#
-#  QT_VERSION_MAJOR The major version of Qt found.
-#  QT_VERSION_MINOR The minor version of Qt found.
-#  QT_VERSION_PATCH The patch version of Qt found.
-#
-#  QT_EDITION               Set to the edition of Qt (i.e. DesktopLight)
-#  QT_EDITION_DESKTOPLIGHT  True if QT_EDITION == DesktopLight
-#  QT_QTCORE_FOUND          True if QtCore was found.
-#  QT_QTGUI_FOUND           True if QtGui was found.
-#  QT_QT3SUPPORT_FOUND      True if Qt3Support was found.
-#  QT_QTASSISTANT_FOUND     True if QtAssistant was found.
-#  QT_QTASSISTANTCLIENT_FOUND  True if QtAssistantClient was found.
-#  QT_QAXCONTAINER_FOUND    True if QAxContainer was found (Windows only).
-#  QT_QAXSERVER_FOUND       True if QAxServer was found (Windows only).
-#  QT_QTDBUS_FOUND          True if QtDBus was found.
-#  QT_QTDESIGNER_FOUND      True if QtDesigner was found.
-#  QT_QTDESIGNERCOMPONENTS  True if QtDesignerComponents was found.
-#  QT_QTHELP_FOUND          True if QtHelp was found.
-#  QT_QTMOTIF_FOUND         True if QtMotif was found.
-#  QT_QTMULTIMEDIA_FOUND    True if QtMultimedia was found (since Qt 4.6.0).
-#  QT_QTNETWORK_FOUND       True if QtNetwork was found.
-#  QT_QTNSPLUGIN_FOUND      True if QtNsPlugin was found.
-#  QT_QTOPENGL_FOUND        True if QtOpenGL was found.
-#  QT_QTSQL_FOUND           True if QtSql was found.
-#  QT_QTSVG_FOUND           True if QtSvg was found.
-#  QT_QTSCRIPT_FOUND        True if QtScript was found.
-#  QT_QTSCRIPTTOOLS_FOUND   True if QtScriptTools was found.
-#  QT_QTTEST_FOUND          True if QtTest was found.
-#  QT_QTUITOOLS_FOUND       True if QtUiTools was found.
-#  QT_QTWEBKIT_FOUND        True if QtWebKit was found.
-#  QT_QTXML_FOUND           True if QtXml was found.
-#  QT_QTXMLPATTERNS_FOUND   True if QtXmlPatterns was found.
-#  QT_PHONON_FOUND          True if phonon was found.
-#  QT_QTDECLARATIVE_FOUND   True if QtDeclarative was found.
-#
-#  QT_MAC_USE_COCOA    For Mac OS X, its whether Cocoa or Carbon is used.
-#                      In general, this should not be used, but its useful
-#                      when having platform specific code.
-#
-#  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_QT3SUPPORT_INCLUDE_DIR   Path to "include/Qt3Support"
-#  QT_QTASSISTANT_INCLUDE_DIR  Path to "include/QtAssistant"
-#  QT_QTASSISTANTCLIENT_INCLUDE_DIR       Path to "include/QtAssistant"
-#  QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
-#  QT_QAXSERVER_INCLUDE_DIR    Path to "include/ActiveQt" (Windows only)
-#  QT_QTCORE_INCLUDE_DIR       Path to "include/QtCore"
-#  QT_QTDBUS_INCLUDE_DIR       Path to "include/QtDBus"
-#  QT_QTDESIGNER_INCLUDE_DIR   Path to "include/QtDesigner"
-#  QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR   Path to "include/QtDesigner"
-#  QT_QTGUI_INCLUDE_DIR        Path to "include/QtGui"
-#  QT_QTHELP_INCLUDE_DIR       Path to "include/QtHelp"
-#  QT_QTMOTIF_INCLUDE_DIR      Path to "include/QtMotif"
-#  QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia"
-#  QT_QTNETWORK_INCLUDE_DIR    Path to "include/QtNetwork"
-#  QT_QTNSPLUGIN_INCLUDE_DIR   Path to "include/QtNsPlugin"
-#  QT_QTOPENGL_INCLUDE_DIR     Path to "include/QtOpenGL"
-#  QT_QTSCRIPT_INCLUDE_DIR     Path to "include/QtScript"
-#  QT_QTSQL_INCLUDE_DIR        Path to "include/QtSql"
-#  QT_QTSVG_INCLUDE_DIR        Path to "include/QtSvg"
-#  QT_QTTEST_INCLUDE_DIR       Path to "include/QtTest"
-#  QT_QTWEBKIT_INCLUDE_DIR     Path to "include/QtWebKit"
-#  QT_QTXML_INCLUDE_DIR        Path to "include/QtXml"
-#  QT_QTXMLPATTERNS_INCLUDE_DIR  Path to "include/QtXmlPatterns"
-#  QT_PHONON_INCLUDE_DIR       Path to "include/phonon"
-#  QT_QTSCRIPTTOOLS_INCLUDE_DIR       Path to "include/QtScriptTools"
-#  QT_QTDECLARATIVE_INCLUDE_DIR       Path to "include/QtDeclarative"
-#
-#  QT_BINARY_DIR               Path to "bin" of Qt4
-#  QT_LIBRARY_DIR              Path to "lib" of Qt4
-#  QT_PLUGINS_DIR              Path to "plugins" for Qt4
-#  QT_TRANSLATIONS_DIR         Path to "translations" of Qt4
-#  QT_IMPORTS_DIR              Path to "imports" of Qt4
-#  QT_DOC_DIR                  Path to "doc" of Qt4
-#  QT_MKSPECS_DIR              Path to "mkspecs" of Qt4
-#
-#
-# The Qt toolkit may contain both debug and release libraries.
-# In that case, the following library variables will contain both.
-# You do not need to use these variables if you include QT_USE_FILE,
-# and use QT_LIBRARIES.
-#
-#  QT_QT3SUPPORT_LIBRARY            The Qt3Support library
-#  QT_QTASSISTANT_LIBRARY           The QtAssistant library
-#  QT_QTASSISTANTCLIENT_LIBRARY     The QtAssistantClient library
-#  QT_QAXCONTAINER_LIBRARY           The QAxContainer library (Windows only)
-#  QT_QAXSERVER_LIBRARY                The QAxServer library (Windows only)
-#  QT_QTCORE_LIBRARY                The QtCore library
-#  QT_QTDBUS_LIBRARY                The QtDBus library
-#  QT_QTDESIGNER_LIBRARY            The QtDesigner library
-#  QT_QTDESIGNERCOMPONENTS_LIBRARY  The QtDesignerComponents library
-#  QT_QTGUI_LIBRARY                 The QtGui library
-#  QT_QTHELP_LIBRARY                The QtHelp library
-#  QT_QTMOTIF_LIBRARY               The QtMotif library
-#  QT_QTMULTIMEDIA_LIBRARY          The QtMultimedia library
-#  QT_QTNETWORK_LIBRARY             The QtNetwork library
-#  QT_QTNSPLUGIN_LIBRARY            The QtNsPLugin library
-#  QT_QTOPENGL_LIBRARY              The QtOpenGL library
-#  QT_QTSCRIPT_LIBRARY              The QtScript library
-#  QT_QTSQL_LIBRARY                 The QtSql library
-#  QT_QTSVG_LIBRARY                 The QtSvg library
-#  QT_QTTEST_LIBRARY                The QtTest library
-#  QT_QTUITOOLS_LIBRARY             The QtUiTools library
-#  QT_QTWEBKIT_LIBRARY              The QtWebKit library
-#  QT_QTXML_LIBRARY                 The QtXml library
-#  QT_QTXMLPATTERNS_LIBRARY         The QtXmlPatterns library
-#  QT_QTMAIN_LIBRARY                The qtmain library for Windows
-#  QT_PHONON_LIBRARY                The phonon library
-#  QT_QTSCRIPTTOOLS_LIBRARY         The QtScriptTools library
-#
-# The QtDeclarative library:             QT_QTDECLARATIVE_LIBRARY
-#
-# also defined, but NOT for general use are
-#  QT_MOC_EXECUTABLE                   Where to find the moc tool.
-#  QT_UIC_EXECUTABLE                   Where to find the uic tool.
-#  QT_UIC3_EXECUTABLE                  Where to find the uic3 tool.
-#  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_QCOLLECTIONGENERATOR_EXECUTABLE  Where to find the qcollectiongenerator tool.
-#  QT_DESIGNER_EXECUTABLE              Where to find the Qt designer tool.
-#  QT_LINGUIST_EXECUTABLE              Where to find the Qt linguist tool.
-#
-#
-# These are around for backwards compatibility
-# they will be set
-#  QT_WRAP_CPP  Set true if QT_MOC_EXECUTABLE is found
-#  QT_WRAP_UI   Set true if QT_UIC_EXECUTABLE is found
-#
-# These variables do _NOT_ have any effect anymore (compared to FindQt.cmake)
-#  QT_MT_REQUIRED         Qt4 is now always multithreaded
-#
-# These variables are set to "" Because Qt structure changed
-# (They make no sense in Qt4)
-#  QT_QT_LIBRARY        Qt-Library is now split
-
-#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-# Use FIND_PACKAGE( Qt4 COMPONENTS ... ) to enable modules
-IF( Qt4_FIND_COMPONENTS )
-  FOREACH( component ${Qt4_FIND_COMPONENTS} )
-    STRING( TOUPPER ${component} _COMPONENT )
-    SET( QT_USE_${_COMPONENT} 1 )
-  ENDFOREACH( component )
-
-  # To make sure we don't use QtCore or QtGui when not in COMPONENTS
-  IF(NOT QT_USE_QTCORE)
-    SET( QT_DONT_USE_QTCORE 1 )
-  ENDIF(NOT QT_USE_QTCORE)
-
-  IF(NOT QT_USE_QTGUI)
-    SET( QT_DONT_USE_QTGUI 1 )
-  ENDIF(NOT QT_USE_QTGUI)
-
-ENDIF( Qt4_FIND_COMPONENTS )
-
-# If Qt3 has already been found, fail.
-IF(QT_QT_LIBRARY)
-  IF(Qt4_FIND_REQUIRED)
-    MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.  If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
-  ELSE(Qt4_FIND_REQUIRED)
-    IF(NOT Qt4_FIND_QUIETLY)
-      MESSAGE( STATUS    "Qt3 and Qt4 cannot be used together in one project.  If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
-    ENDIF(NOT Qt4_FIND_QUIETLY)
-    RETURN()
-  ENDIF(Qt4_FIND_REQUIRED)
-ENDIF(QT_QT_LIBRARY)
-
-
-INCLUDE(CheckCXXSymbolExists)
-INCLUDE(MacroAddFileDependencies)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-
-SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
-
-SET( QT_DEFINITIONS "")
-
-# convenience macro for dealing with debug/release library names
-MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
-
-  STRING(TOUPPER "${_camelCaseBasename}" basename)
-
-  # The name of the imported targets, i.e. the prefix "Qt4::" must not change,
-  # since it is stored in EXPORT-files as name of a required library. If the name would change
-  # here, this would lead to the imported Qt4-library targets not being resolved by cmake anymore.
-  IF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
-
-    IF(NOT TARGET Qt4::${_camelCaseBasename})
-      ADD_LIBRARY(Qt4::${_camelCaseBasename} UNKNOWN IMPORTED )
-
-      IF (QT_${basename}_LIBRARY_RELEASE)
-        SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
-        if(QT_USE_FRAMEWORKS)
-          SET_PROPERTY(TARGET Qt4::${_camelCaseBasename}        PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}/${_camelCaseBasename}" )
-        else()
-          SET_PROPERTY(TARGET Qt4::${_camelCaseBasename}        PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}" )
-        endif()
-      ENDIF (QT_${basename}_LIBRARY_RELEASE)
-
-      IF (QT_${basename}_LIBRARY_DEBUG)
-        SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
-        if(QT_USE_FRAMEWORKS)
-          SET_PROPERTY(TARGET Qt4::${_camelCaseBasename}        PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}/${_camelCaseBasename}" )
-        else()
-          SET_PROPERTY(TARGET Qt4::${_camelCaseBasename}        PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
-        endif()
-      ENDIF (QT_${basename}_LIBRARY_DEBUG)
-    ENDIF(NOT TARGET Qt4::${_camelCaseBasename})
-
-    # If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these
-    # imported targets. This works better in general, and is also in almost all cases fully
-    # backward compatible. The only issue is when a project A which had this enabled then exports its
-    # libraries via export or EXPORT_LIBRARY_DEPENDENCIES(). In this case the libraries from project
-    # A will depend on the imported Qt targets, and the names of these imported targets will be stored
-    # in the dependency files on disk. This means when a project B then uses project A, these imported
-    # targets must be created again, otherwise e.g. "Qt4__QtCore" will be interpreted as name of a
-    # library file on disk, and not as a target, and linking will fail:
-    IF(QT_USE_IMPORTED_TARGETS)
-        SET(QT_${basename}_LIBRARY       Qt4::${_camelCaseBasename} )
-        SET(QT_${basename}_LIBRARIES     Qt4::${_camelCaseBasename} )
-    ELSE(QT_USE_IMPORTED_TARGETS)
-
-      # if the release- as well as the debug-version of the library have been found:
-      IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
-        # if the generator supports configuration types then set
-        # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
-        IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-          SET(QT_${basename}_LIBRARY       optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
-        ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-          # if there are no configuration types and CMAKE_BUILD_TYPE has no value
-          # then just use the release libraries
-          SET(QT_${basename}_LIBRARY       ${QT_${basename}_LIBRARY_RELEASE} )
-        ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-        SET(QT_${basename}_LIBRARIES       optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
-      ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
-
-      # if only the release version was found, set the debug variable also to the release version
-      IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
-        SET(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE})
-        SET(QT_${basename}_LIBRARY       ${QT_${basename}_LIBRARY_RELEASE})
-        SET(QT_${basename}_LIBRARIES     ${QT_${basename}_LIBRARY_RELEASE})
-      ENDIF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
-
-      # if only the debug version was found, set the release variable also to the debug version
-      IF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
-        SET(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG})
-        SET(QT_${basename}_LIBRARY         ${QT_${basename}_LIBRARY_DEBUG})
-        SET(QT_${basename}_LIBRARIES       ${QT_${basename}_LIBRARY_DEBUG})
-      ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
-
-      # put the value in the cache:
-      SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE)
-
-    ENDIF(QT_USE_IMPORTED_TARGETS)
-
-    SET(QT_${basename}_FOUND 1)
-
-  ELSE (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
-
-    SET(QT_${basename}_LIBRARY "" CACHE STRING "The Qt ${basename} library" FORCE)
-
-  ENDIF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
-
-  IF (QT_${basename}_INCLUDE_DIR)
-    #add the include directory to QT_INCLUDES
-    SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
-  ENDIF (QT_${basename}_INCLUDE_DIR)
-
-  # Make variables changeble to the advanced user
-  MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR)
-ENDMACRO (_QT4_ADJUST_LIB_VARS)
-
-function(_QT4_QUERY_QMAKE VAR RESULT)
-  execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR}
-    RESULT_VARIABLE return_code
-    OUTPUT_VARIABLE output ERROR_VARIABLE output
-    OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE)
-  if(NOT return_code)
-    file(TO_CMAKE_PATH "${output}" output)
-    set(${RESULT} ${output} PARENT_SCOPE)
-  endif(NOT return_code)
-endfunction(_QT4_QUERY_QMAKE)
-
-
-SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
-
-GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
-# check for qmake
-# Debian uses qmake-qt4
-# macports' Qt uses qmake-mac
-FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac 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
-  DOC "The qmake executable for the Qt installation to use"
-)
-
-# double check that it was a Qt4 qmake, if not, re-find with different names
-IF (QT_QMAKE_EXECUTABLE)
-
-  IF(QT_QMAKE_EXECUTABLE_LAST)
-    STRING(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED)
-  ENDIF(QT_QMAKE_EXECUTABLE_LAST)
-
-  SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE)
-
-  _qt4_query_qmake(QT_VERSION QTVERSION)
-
-  # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
-  IF(NOT QTVERSION)
-    SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
-    FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES 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"
-      $ENV{QTDIR}/bin
-      DOC "The qmake executable for the Qt installation to use"
-      )
-    IF(QT_QMAKE_EXECUTABLE)
-      _qt4_query_qmake(QT_VERSION QTVERSION)
-    ENDIF(QT_QMAKE_EXECUTABLE)
-  ENDIF(NOT QTVERSION)
-
-ENDIF (QT_QMAKE_EXECUTABLE)
-
-IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
-
-  # ask qmake for the mkspecs directory
-  # we do this first because QT_LIBINFIX might be set
-  IF (NOT QT_MKSPECS_DIR  OR  QT_QMAKE_CHANGED)
-    _qt4_query_qmake(QMAKE_MKSPECS qt_mkspecs_dirs)
-    # do not replace : on windows as it might be a drive letter
-    # and windows should already use ; as a separator
-    IF(NOT WIN32)
-      STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
-    ENDIF(NOT WIN32)
-    set(qt_cross_paths)
-    foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
-      set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/mkspecs")
-    endforeach(qt_cross_path)
-    SET(QT_MKSPECS_DIR NOTFOUND)
-    FIND_PATH(QT_MKSPECS_DIR NAMES qconfig.pri
-      HINTS ${qt_cross_paths} ${qt_mkspecs_dirs}
-      DOC "The location of the Qt mkspecs containing qconfig.pri")
-  ENDIF()
-
-  IF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
-    FILE(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents)
-    STRING(REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG "${_qconfig_FILE_contents}")
-    STRING(REGEX MATCH "CONFIG[^\n]+" QT_CONFIG "${_qconfig_FILE_contents}")
-    STRING(REGEX MATCH "EDITION[^\n]+" QT_EDITION "${_qconfig_FILE_contents}")
-    STRING(REGEX MATCH "QT_LIBINFIX[^\n]+" _qconfig_qt_libinfix "${_qconfig_FILE_contents}")
-    STRING(REGEX REPLACE "QT_LIBINFIX *= *([^\n]*)" "\\1" QT_LIBINFIX "${_qconfig_qt_libinfix}")
-  ENDIF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
-  IF("${QT_EDITION}" MATCHES "DesktopLight")
-    SET(QT_EDITION_DESKTOPLIGHT 1)
-  ENDIF("${QT_EDITION}" MATCHES "DesktopLight")
-
-  # ask qmake for the library dir as a hint, then search for QtCore library and use that as a reference for finding the
-  # others and for setting QT_LIBRARY_DIR
-  IF (NOT (QT_QTCORE_LIBRARY_RELEASE OR QT_QTCORE_LIBRARY_DEBUG)  OR QT_QMAKE_CHANGED)
-    _qt4_query_qmake(QT_INSTALL_LIBS QT_LIBRARY_DIR_TMP)
-    SET(QT_QTCORE_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QTCORE_LIBRARY_DEBUG NOTFOUND)
-    FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
-                 NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
-                 HINTS ${QT_LIBRARY_DIR_TMP}
-                 NO_DEFAULT_PATH
-        )
-    FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
-                 NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
-                 HINTS ${QT_LIBRARY_DIR_TMP}
-                 NO_DEFAULT_PATH
-        )
-
-    IF(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
-      FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
-                   NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
-                   HINTS ${QT_LIBRARY_DIR_TMP}
-          )
-      FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
-                   NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
-                   HINTS ${QT_LIBRARY_DIR_TMP}
-          )
-    ENDIF(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
-
-    # try dropping a hint if trying to use Visual Studio with Qt built by mingw
-    IF(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
-      IF(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
-        MESSAGE( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw.  Those compilers do not produce code compatible with each other.")
-      ENDIF(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
-    ENDIF(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
-
-  ENDIF ()
-
-  # set QT_LIBRARY_DIR based on location of QtCore found.
-  IF(QT_QTCORE_LIBRARY_RELEASE)
-    GET_FILENAME_COMPONENT(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_RELEASE}" PATH)
-    SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE INTERNAL "Qt library dir" FORCE)
-    SET(QT_QTCORE_FOUND 1)
-  ELSEIF(QT_QTCORE_LIBRARY_DEBUG)
-    GET_FILENAME_COMPONENT(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_DEBUG}" PATH)
-    SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE INTERNAL "Qt library dir" FORCE)
-    SET(QT_QTCORE_FOUND 1)
-  ELSE()
-    MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}")
-    MESSAGE("Warning: But QtCore couldn't be found.  Qt must NOT be installed correctly, or it wasn't found for cross compiling.")
-    IF(Qt4_FIND_REQUIRED)
-      MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
-    ENDIF(Qt4_FIND_REQUIRED)
-  ENDIF()
-
-  # ask qmake for the binary dir
-  IF (NOT QT_BINARY_DIR  OR  QT_QMAKE_CHANGED)
-    _qt4_query_qmake(QT_INSTALL_BINS qt_bins)
-    SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
-  ENDIF (NOT QT_BINARY_DIR  OR  QT_QMAKE_CHANGED)
-
-  IF (APPLE)
-    SET(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK})
-    IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-      SET(QT_USE_FRAMEWORKS ON CACHE INTERNAL "" FORCE)
-      SET(CMAKE_FIND_FRAMEWORK FIRST)
-    ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-      SET(QT_USE_FRAMEWORKS OFF CACHE INTERNAL "" FORCE)
-      SET(CMAKE_FIND_FRAMEWORK LAST)
-    ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-  ENDIF (APPLE)
-
-  # ask qmake for the include dir
-  IF (QT_LIBRARY_DIR AND (NOT QT_QTCORE_INCLUDE_DIR OR NOT QT_HEADERS_DIR OR  QT_QMAKE_CHANGED))
-      _qt4_query_qmake(QT_INSTALL_HEADERS qt_headers)
-      SET(QT_QTCORE_INCLUDE_DIR NOTFOUND)
-      FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore
-                HINTS ${qt_headers} ${QT_LIBRARY_DIR}
-                PATH_SUFFIXES QtCore qt4/QtCore
-        )
-
-      # Set QT_HEADERS_DIR based on finding QtCore header
-      IF(QT_QTCORE_INCLUDE_DIR)
-        IF(QT_USE_FRAMEWORKS)
-          SET(QT_HEADERS_DIR "${qt_headers}" CACHE INTERNAL "" FORCE)
-        ELSE(QT_USE_FRAMEWORKS)
-          GET_FILENAME_COMPONENT(qt_headers "${QT_QTCORE_INCLUDE_DIR}/../" ABSOLUTE)
-          SET(QT_HEADERS_DIR "${qt_headers}" CACHE INTERNAL "" FORCE)
-        ENDIF(QT_USE_FRAMEWORKS)
-      ELSEIF()
-        MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_HEADERS as ${qt_headers}")
-        MESSAGE("Warning: But QtCore couldn't be found.  Qt must NOT be installed correctly.")
-      ENDIF()
-  ENDIF()
-
-  IF(APPLE)
-    SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_OLD})
-  ENDIF(APPLE)
-
-  # Set QT_INCLUDE_DIR based on QT_HEADERS_DIR
-  IF(QT_HEADERS_DIR)
-    IF(QT_USE_FRAMEWORKS)
-      # Qt/Mac frameworks has two include dirs.
-      # One is the framework include for which CMake will add a -F flag
-      # and the other is an include dir for non-framework Qt modules
-      SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR} ${QT_QTCORE_LIBRARY_RELEASE} )
-    ELSE(QT_USE_FRAMEWORKS)
-      SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
-    ENDIF(QT_USE_FRAMEWORKS)
-  ENDIF(QT_HEADERS_DIR)
-
-  # Set QT_INCLUDES
-  SET( QT_INCLUDES ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
-
-
-  # ask qmake for the documentation directory
-  IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR  OR  QT_QMAKE_CHANGED)
-    _qt4_query_qmake(QT_INSTALL_DOCS qt_doc_dir)
-    SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE)
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR  OR  QT_QMAKE_CHANGED)
-
-
-  # ask qmake for the plugins directory
-  IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR  OR  QT_QMAKE_CHANGED)
-    _qt4_query_qmake(QT_INSTALL_PLUGINS qt_plugins_dir)
-    SET(QT_PLUGINS_DIR NOTFOUND)
-    foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
-      set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/plugins")
-    endforeach(qt_cross_path)
-    FIND_PATH(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs designer
-      HINTS ${qt_cross_paths} ${qt_plugins_dir}
-      DOC "The location of the Qt plugins")
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR  OR  QT_QMAKE_CHANGED)
-
-  # ask qmake for the translations directory
-  IF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR  OR  QT_QMAKE_CHANGED)
-    _qt4_query_qmake(QT_INSTALL_TRANSLATIONS qt_translations_dir)
-    SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE)
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR  OR  QT_QMAKE_CHANGED)
-
-  # ask qmake for the imports directory
-  IF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
-    _qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir)
-    if(qt_imports_dir)
-      SET(QT_IMPORTS_DIR "${qt_imports_dir}")
-      foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
-        set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/imports")
-      endforeach(qt_cross_path)
-      FIND_PATH(QT_IMPORTS_DIR NAMES Qt
-        HINTS ${qt_cross_paths} ${qt_imports_dir}
-        DOC "The location of the Qt imports"
-        NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
-        NO_CMAKE_SYSTEM_PATH)
-      mark_as_advanced(QT_IMPORTS_DIR)
-    endif(qt_imports_dir)
-  ENDIF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR  OR  QT_QMAKE_CHANGED)
-
-  # Make variables changeble to the advanced user
-  MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR
-                    QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
-
-
-
-
-  #############################################
-  #
-  # Find out what window system we're using
-  #
-  #############################################
-  # Save required variable
-  SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
-  SET(CMAKE_REQUIRED_FLAGS_SAVE    ${CMAKE_REQUIRED_FLAGS})
-  # Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
-  SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}")
-  # Check for Window system symbols (note: only one should end up being set)
-  CHECK_CXX_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
-  CHECK_CXX_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
-  CHECK_CXX_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
-  CHECK_CXX_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
-  IF(Q_WS_MAC)
-    IF(QT_QMAKE_CHANGED)
-      UNSET(QT_MAC_USE_COCOA CACHE)
-    ENDIF(QT_QMAKE_CHANGED)
-    CHECK_CXX_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
-  ENDIF(Q_WS_MAC)
-
-  IF (QT_QTCOPY_REQUIRED)
-     CHECK_CXX_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
-     IF (NOT QT_IS_QTCOPY)
-        MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
-     ENDIF (NOT QT_IS_QTCOPY)
-  ENDIF (QT_QTCOPY_REQUIRED)
-
-  # Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
-  SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
-  SET(CMAKE_REQUIRED_FLAGS    ${CMAKE_REQUIRED_FLAGS_SAVE})
-  #
-  #############################################
-
-
-
-  ########################################
-  #
-  #       Setting the INCLUDE-Variables
-  #
-  ########################################
-
-  SET(QT_MODULES QtGui Qt3Support QtSvg QtScript QtTest QtUiTools
-                 QtHelp QtWebKit QtXmlPatterns phonon QtNetwork QtMultimedia
-                 QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools
-                 QtDeclarative)
-
-  IF(Q_WS_X11)
-    SET(QT_MODULES ${QT_MODULES} QtMotif)
-  ENDIF(Q_WS_X11)
-
-  IF(QT_QMAKE_CHANGED)
-    FOREACH(QT_MODULE ${QT_MODULES})
-      STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
-      SET(QT_${_upper_qt_module}_INCLUDE_DIR NOTFOUND)
-      SET(QT_${_upper_qt_module}_LIBRARY_RELEASE NOTFOUND)
-      SET(QT_${_upper_qt_module}_LIBRARY_DEBUG NOTFOUND)
-    ENDFOREACH(QT_MODULE)
-    SET(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR NOTFOUND)
-    SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QTASSISTANTCLIENT_INCLUDE_DIR NOTFOUND)
-    SET(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QTASSISTANT_INCLUDE_DIR NOTFOUND)
-    SET(QT_QTASSISTANT_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QAXCONTAINER_INCLUDE_DIR NOTFOUND)
-    SET(QT_QAXCONTAINER_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QAXCONTAINER_LIBRARY_DEBUG NOTFOUND)
-    SET(QT_QAXSERVER_INCLUDE_DIR NOTFOUND)
-    SET(QT_QAXSERVER_LIBRARY_RELEASE NOTFOUND)
-    SET(QT_QAXSERVER_LIBRARY_DEBUG NOTFOUND)
-    IF(Q_WS_WIN)
-      SET(QT_QTMAIN_LIBRARY_DEBUG NOTFOUND)
-      SET(QT_QTMAIN_LIBRARY_RELEASE NOTFOUND)
-    ENDIF(Q_WS_WIN)
-  ENDIF(QT_QMAKE_CHANGED)
-
-  FOREACH(QT_MODULE ${QT_MODULES})
-    STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
-    FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE}
-              PATHS
-              ${QT_HEADERS_DIR}/${QT_MODULE}
-              ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
-              NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-      )
-    # phonon doesn't seem consistent, let's try phonondefs.h for some
-    # installations
-    IF(${QT_MODULE} STREQUAL "phonon")
-      FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR phonondefs.h
-                PATHS
-                ${QT_HEADERS_DIR}/${QT_MODULE}
-                ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
-                NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-        )
-    ENDIF(${QT_MODULE} STREQUAL "phonon")
-  ENDFOREACH(QT_MODULE)
-
-  IF(Q_WS_WIN)
-    SET(QT_MODULES ${QT_MODULES} QAxContainer QAxServer)
-    # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
-    FIND_PATH(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
-      PATHS ${QT_HEADERS_DIR}/ActiveQt
-      NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-      )
-    FIND_PATH(QT_QAXSERVER_INCLUDE_DIR ActiveQt
-      PATHS ${QT_HEADERS_DIR}/ActiveQt
-      NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-      )
-  ENDIF(Q_WS_WIN)
-
-  # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
-  FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
-    PATHS
-    ${QT_HEADERS_DIR}/QtDesigner
-    ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  # Set QT_QTASSISTANT_INCLUDE_DIR
-  FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant
-    PATHS
-    ${QT_HEADERS_DIR}/QtAssistant
-    ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
-  FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient
-    PATHS
-    ${QT_HEADERS_DIR}/QtAssistant
-    ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  ########################################
-  #
-  #       Setting the LIBRARY-Variables
-  #
-  ########################################
-
-  # find the libraries
-  FOREACH(QT_MODULE ${QT_MODULES})
-    STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
-    FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE
-                 NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4
-                 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-        )
-    FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG
-                 NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4
-                 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-        )
-  ENDFOREACH(QT_MODULE)
-
-  # QtUiTools is sometimes not in the same directory as the other found libraries
-  # e.g. on Mac, its never a framework like the others are
-  IF(QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
-    FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
-  ENDIF(QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
-
-  # Set QT_QTDESIGNERCOMPONENTS_LIBRARY
-  FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-  FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG   NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-
-  # Set QT_QTMAIN_LIBRARY
-  IF(Q_WS_WIN)
-    FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-    FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-  ENDIF(Q_WS_WIN)
-
-  # Set QT_QTASSISTANTCLIENT_LIBRARY
-  FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-  FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG   NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR}  NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-
-  # Set QT_QTASSISTANT_LIBRARY
-  FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-  FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG   NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-
-  # Set QT_QTHELP_LIBRARY
-  FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-  FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG   NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-  IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
-    FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
-  ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
-
-
-  ############################################
-  #
-  # Check the existence of the libraries.
-  #
-  ############################################
-
-
-  # Set QT_xyz_LIBRARY variable and add
-  # library include path to QT_INCLUDES
-  _QT4_ADJUST_LIB_VARS(QtCore)
-
-  FOREACH(QT_MODULE ${QT_MODULES})
-    _QT4_ADJUST_LIB_VARS(${QT_MODULE})
-  ENDFOREACH(QT_MODULE)
-
-  _QT4_ADJUST_LIB_VARS(QtAssistant)
-  _QT4_ADJUST_LIB_VARS(QtAssistantClient)
-  _QT4_ADJUST_LIB_VARS(QtCLucene)
-  _QT4_ADJUST_LIB_VARS(QtDesignerComponents)
-
-  # platform dependent libraries
-  IF(Q_WS_WIN)
-    _QT4_ADJUST_LIB_VARS(qtmain)
-    _QT4_ADJUST_LIB_VARS(QAxServer)
-    _QT4_ADJUST_LIB_VARS(QAxContainer)
-  ENDIF(Q_WS_WIN)
-
-
-  #######################################
-  #
-  #       Check the executables of Qt
-  #          ( moc, uic, rcc )
-  #
-  #######################################
-
-
-  IF(QT_QMAKE_CHANGED)
-    SET(QT_UIC_EXECUTABLE NOTFOUND)
-    SET(QT_MOC_EXECUTABLE NOTFOUND)
-    SET(QT_UIC3_EXECUTABLE NOTFOUND)
-    SET(QT_RCC_EXECUTABLE NOTFOUND)
-    SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND)
-    SET(QT_DBUSXML2CPP_EXECUTABLE NOTFOUND)
-    SET(QT_LUPDATE_EXECUTABLE NOTFOUND)
-    SET(QT_LRELEASE_EXECUTABLE NOTFOUND)
-    SET(QT_QCOLLECTIONGENERATOR_EXECUTABLE NOTFOUND)
-    SET(QT_DESIGNER_EXECUTABLE NOTFOUND)
-    SET(QT_LINGUIST_EXECUTABLE NOTFOUND)
-  ENDIF(QT_QMAKE_CHANGED)
-
-  FIND_PROGRAM(QT_MOC_EXECUTABLE
-    NAMES moc-qt4 moc
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_UIC_EXECUTABLE
-    NAMES uic-qt4 uic
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_UIC3_EXECUTABLE
-    NAMES uic3
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_RCC_EXECUTABLE
-    NAMES rcc
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE
-    NAMES qdbuscpp2xml
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE
-    NAMES qdbusxml2cpp
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
-    NAMES lupdate-qt4 lupdate
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
-    NAMES lrelease-qt4 lrelease
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE
-    NAMES qcollectiongenerator-qt4 qcollectiongenerator
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_DESIGNER_EXECUTABLE
-    NAMES designer-qt4 designer
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  FIND_PROGRAM(QT_LINGUIST_EXECUTABLE
-    NAMES linguist-qt4 linguist
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-    )
-
-  IF (QT_MOC_EXECUTABLE)
-     SET(QT_WRAP_CPP "YES")
-  ENDIF (QT_MOC_EXECUTABLE)
-
-  IF (QT_UIC_EXECUTABLE)
-     SET(QT_WRAP_UI "YES")
-  ENDIF (QT_UIC_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 QT_QCOLLECTIONGENERATOR_EXECUTABLE
-    QT_DESIGNER_EXECUTABLE QT_LINGUIST_EXECUTABLE)
-
-
-  # get the directory of the current file, used later on in the file
-  GET_FILENAME_COMPONENT( _qt4_current_dir  "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-
-  ###############################################
-  #
-  #       configuration/system dependent settings
-  #
-  ###############################################
-
-  INCLUDE("${_qt4_current_dir}/Qt4ConfigDependentSettings.cmake")
-
-
-  #######################################
-  #
-  #       Check the plugins of Qt
-  #
-  #######################################
-
-  SET( QT_PLUGIN_TYPES accessible bearer codecs decorations designer gfxdrivers graphicssystems iconengines imageformats inputmethods mousedrivers phonon_backend script sqldrivers )
-
-  SET( QT_ACCESSIBLE_PLUGINS qtaccessiblecompatwidgets qtaccessiblewidgets )
-  SET( QT_BEARER_PLUGINS qcorewlanbearer qgenericbearer )
-  SET( QT_CODECS_PLUGINS qcncodecs qjpcodecs qkrcodecs qtwcodecs )
-  SET( QT_DECORATIONS_PLUGINS qdecorationdefault qdecorationwindows )
-  SET( QT_DESIGNER_PLUGINS arthurplugin containerextension customwidgetplugin phononwidgets qdeclarativeview qt3supportwidgets qwebview taskmenuextension worldtimeclockplugin )
-  SET( QT_GRAPHICSDRIVERS_PLUGINS qgfxtransformed qgfxvnc qscreenvfb )
-  SET( QT_GRAPHICSSYSTEMS_PLUGINS qglgraphicssystem qtracegraphicssystem )
-  SET( QT_ICONENGINES_PLUGINS qsvgicon )
-  SET( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff  )
-  SET( QT_INPUTMETHODS_PLUGINS qimsw_multi )
-  SET( QT_MOUSEDRIVERS_PLUGINS qwstslibmousehandler )
-  SET( QT_PHONON_BACKEND_PLUGINS phonon_qt7 )
-  SET( QT_SCRIPT_PLUGINS qtscriptdbus )
-  SET( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds )
-
-  SET( QT_PHONON_PLUGINS ${QT_PHONON_BACKEND_PLUGINS} )
-  SET( QT_QT3SUPPORT_PLUGINS qtaccessiblecompatwidgets )
-  SET( QT_QTCORE_PLUGINS ${QT_BEARER_PLUGINS} ${QT_CODECS_PLUGINS} )
-  SET( QT_QTGUI_PLUGINS qtaccessiblewidgets qgif qjpeg qmng qico qtiff ${QT_DECORATIONS_PLUGINS} ${QT_GRAPHICSDRIVERS_PLUGINS} ${QT_GRAPHICSSYSTEMS_PLUGINS} ${QT_INPUTMETHODS_PLUGINS} ${QT_MOUSEDRIVERS_PLUGINS} )
-  SET( QT_QTSCRIPT_PLUGINS ${QT_SCRIPT_PLUGINS} )
-  SET( QT_QTSQL_PLUGINS ${QT_SQLDRIVERS_PLUGINS} )
-  SET( QT_QTSVG_PLUGINS qsvg qsvgicon )
-
-  IF(QT_QMAKE_CHANGED)
-    FOREACH(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES})
-      STRING(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type)
-      SET(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE})
-      FOREACH(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS})
-        STRING(TOUPPER ${QT_PLUGIN} _upper_qt_plugin)
-        UNSET(QT_${_upper_qt_plugin}_LIBRARY_RELEASE CACHE)
-        UNSET(QT_${_upper_qt_plugin}_LIBRARY_DEBUG CACHE)
-        UNSET(QT_${_upper_qt_plugin}_LIBRARY CACHE)
-        UNSET(QT_${_upper_qt_plugin}_PLUGIN_RELEASE CACHE)
-        UNSET(QT_${_upper_qt_plugin}_PLUGIN_DEBUG CACHE)
-        UNSET(QT_${_upper_qt_plugin}_PLUGIN CACHE)
-      ENDFOREACH(QT_PLUGIN)
-    ENDFOREACH(QT_PLUGIN_TYPE)
-  ENDIF(QT_QMAKE_CHANGED)
-
-  # find_library works better than find_file but we need to set prefixes to only match plugins
-  FOREACH(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES})
-    STRING(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type)
-    SET(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE})
-    FOREACH(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS})
-      STRING(TOUPPER ${QT_PLUGIN} _upper_qt_plugin)
-      IF(QT_IS_STATIC)
-        FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_RELEASE
-                     NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
-                     PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-            )
-        FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_DEBUG
-                     NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
-                     PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-            )
-        _QT4_ADJUST_LIB_VARS(${QT_PLUGIN})
-      ELSE(QT_IS_STATIC)
-        # find_library works easier/better than find_file but we need to set suffixes to only match plugins
-        SET(CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT ${CMAKE_FIND_LIBRARY_SUFFIXES})
-        SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_MODULE_SUFFIX} ${CMAKE_SHARED_LIBRARY_SUFFIX})
-        FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_RELEASE
-                     NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
-                     PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-            )
-        FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_DEBUG
-                     NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
-                     PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
-            )
-        MARK_AS_ADVANCED(QT_${_upper_qt_plugin}_PLUGIN_RELEASE QT_${_upper_qt_plugin}_PLUGIN_DEBUG)
-        SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT})
-      ENDIF(QT_IS_STATIC)
-    ENDFOREACH(QT_PLUGIN)
-  ENDFOREACH(QT_PLUGIN_TYPE)
-
-
-  ######################################
-  #
-  #       Macros for building Qt files
-  #
-  ######################################
-
-  INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake")
-
-  # set version variables
-  STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
-  STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
-  STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-
-ENDIF(QT_QMAKE_EXECUTABLE AND QTVERSION)
-
-#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
-IF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION)
-  SET(Qt4_FIND_VERSION ${QT_MIN_VERSION})
-ENDIF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION)
-
-IF( Qt4_FIND_COMPONENTS )
-
-  # if components specified in find_package(), make sure each of those pieces were found
-  SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR)
-  FOREACH( component ${Qt4_FIND_COMPONENTS} )
-    STRING( TOUPPER ${component} _COMPONENT )
-    if(${_COMPONENT} STREQUAL "QTMAIN")
-      IF(Q_WS_WIN)
-        SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_LIBRARY)
-      ENDIF(Q_WS_WIN)
-    else(${_COMPONENT} STREQUAL "QTMAIN")
-      SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_INCLUDE_DIR QT_${_COMPONENT}_LIBRARY)
-    endif(${_COMPONENT} STREQUAL "QTMAIN")
-  ENDFOREACH( component )
-
-  if(Qt4_FIND_COMPONENTS MATCHES QtGui)
-    SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_UIC_EXECUTABLE)
-  endif(Qt4_FIND_COMPONENTS MATCHES QtGui)
-
-ELSE( Qt4_FIND_COMPONENTS )
-
-  # if no components specified, we'll make a default set of required variables to say Qt is found
-  SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR
-    QT_LIBRARY_DIR QT_QTCORE_LIBRARY)
-
-ENDIF( Qt4_FIND_COMPONENTS )
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
-  REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
-  VERSION_VAR QTVERSION
-  )
-
-#######################################
-#
-#       compatibility settings
-#
-#######################################
-# Backwards compatibility for CMake1.4 and 1.2
-SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
-SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
-SET( QT_QT_LIBRARY "")
-SET(QT_FOUND ${QT4_FOUND})
-


fixed: simplify test if a lib is already defined as import target

      Many thanks to Johannes Zarl for the patch!

git-svn-id: 9c86407f91444b2cc93bb44d37d96a685973386f@2486 4683daeb-ad0f-0410-a623-93161e962ae5

--- CMake/FindOpenSG.cmake
+++ CMake/FindOpenSG.cmake
@@ -196,16 +196,14 @@
     FOREACH(COMPONENT ${OpenSG_FIND_COMPONENTS})
         STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)

-        GET_TARGET_PROPERTY(__OpenSG_COMPONENT_IMPORTED ${COMPONENT} IMPORTED)
-
-        IF(NOT __OpenSG_COMPONENT_IMPORTED)
-            # avoid setting up componentes more than once - which is not
-            # allowed for import libraries
+        # avoid setting up componentes more than once - which is not
+        # allowed for import libraries
+        IF(NOT TARGET ${COMPONENT})
             __OpenSG_ADJUST_LIB_VARS(${UPPERCOMPONENT} ${COMPONENT})
+
             SET(OpenSG_LIBRARIES ${OpenSG_LIBRARIES} ${OpenSG_${UPPERCOMPONENT}_LIBRARY})
-
             SETUP_OSG_LIB_TARGETS(${COMPONENT} ${UPPERCOMPONENT})
-        ENDIF(NOT __OpenSG_COMPONENT_IMPORTED)
+        ENDIF(NOT TARGET ${COMPONENT})
     ENDFOREACH(COMPONENT)

     SET(OpenSG_INCLUDE_DIRS "${OpenSG_INCLUDE_DIR}" "${OpenSG_INCLUDE_DIR}/OpenSG")


Issue #4012: Fix CppCheck in NiftyLink-build

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -126,7 +126,8 @@
       -DOpenIGTLink_SOURCE_DIR:PATH=${OpenIGTLink_SOURCE_DIR}
       -DOpenIGTLink_DIR:PATH=${OpenIGTLink_DIR}
       -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-      -DNIFTYLINK_USE_KWSTYLE:BOOL=${NIFTYLINK_USE_KWSTYLE}
+      -DNIFTYLINK_USE_KWSTYLE:BOOL=${NIFTYLINK_USE_KWSTYLE}
+      -DNIFTYLINK_USE_CPPCHECK:BOOL=${NIFTYLINK_USE_CPPCHECK}
      DEPENDS ${proj_DEPENDENCIES}
   )


COMP: Fix Insight configuration warnings about unused variables.

Change-Id: I0cf40f74dc46f158d7943adecaf5ec697e31761e

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -100,7 +100,7 @@
       BINARY_DIR Insight-Build
       CMAKE_GENERATOR ${gen}
       CMAKE_ARGS
-        -Dgit_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
+        -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
         -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
         -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
         -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
@@ -110,7 +110,6 @@
         -DBUILD_EXAMPLES:BOOL=OFF
         -DBUILD_TESTING:BOOL=OFF
         -DITK_USE_REVIEW:BOOL=ON
-        -DITK_USE_OPTIMIZED_REGISTRATION_METHODS:BOOL=ON
         -DITKV3_COMPATIBILITY:BOOL=ON
       INSTALL_COMMAND ""
       )


GetGitRevisionDescription: Fix issue referencing project source

This commit fixes the module by consistently using PROJECT_SOURCE_DIR
and PROJECT_BINARY_DIR variable.

Thanks to Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
for contributing this patch to the BRAINSTools project.

--- CMake/GetGitRevisionDescription.cmake
+++ CMake/GetGitRevisionDescription.cmake
@@ -47,15 +47,19 @@
 		set(${_hashvar} "GIT-NOTFOUND" PARENT_SCOPE)
 		return()
 	endif()
+
+	set(src_dir ${PROJECT_SOURCE_DIR})
+	set(bin_dir ${PROJECT_BINARY_DIR})
+
 	execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --git-dir
-		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+		WORKING_DIRECTORY ${src_dir}
 		OUTPUT_VARIABLE GIT_DIR
 		ERROR_VARIABLE error
 		RESULT_VARIABLE failed
 		OUTPUT_STRIP_TRAILING_WHITESPACE
 		)
 	if(NOT IS_ABSOLUTE "${GIT_DIR}")
-		set(GIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${GIT_DIR}")
+		set(GIT_DIR "${src_dir}/${GIT_DIR}")
 	endif()
 	if(failed OR NOT EXISTS "${GIT_DIR}/HEAD")
 		# not in git
@@ -63,7 +67,7 @@
 		set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
 		return()
 	endif()
-	set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
+	set(GIT_DATA "${bin_dir}/CMakeFiles/git-data")
 	if(NOT EXISTS "${GIT_DATA}")
 		file(MAKE_DIRECTORY "${GIT_DATA}")
 	endif()
@@ -79,7 +83,7 @@
 		set(HEAD_REF "")
 	endif()
 	execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
-		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+		WORKING_DIRECTORY ${src_dir}
 		OUTPUT_VARIABLE HEAD_HASH OUTPUT_STRIP_TRAILING_WHITESPACE
 		ERROR_VARIABLE error
 		RESULT_VARIABLE failed)
@@ -94,8 +98,10 @@
 function(git_commits_since file _commits )
   get_git_head_revision(ref head)

+  set(src_dir ${PROJECT_SOURCE_DIR})
+
   execute_process(COMMAND ${GIT_EXECUTABLE} rev-list ${head} -n 1 -- ${file}
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    WORKING_DIRECTORY ${src_dir}
     OUTPUT_VARIABLE tag OUTPUT_STRIP_TRAILING_WHITESPACE
     ERROR_VARIABLE error
     RESULT_VARIABLE failed
@@ -105,7 +111,7 @@
   endif()

   execute_process(COMMAND ${GIT_EXECUTABLE} rev-list ${tag}..${head}
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    WORKING_DIRECTORY ${src_dir}
     OUTPUT_VARIABLE rev_list OUTPUT_STRIP_TRAILING_WHITESPACE
     ERROR_VARIABLE error
     RESULT_VARIABLE failed
@@ -132,6 +138,8 @@
 		return()
 	endif()

+	set(src_dir ${PROJECT_SOURCE_DIR})
+
 	# TODO sanitize
 	#if((${ARGN}" MATCHES "&&") OR
 	#	(ARGN MATCHES "||") OR
@@ -143,7 +151,7 @@
 	#message(STATUS "Arguments to execute_process: ${ARGN}")

 	execute_process(COMMAND "${GIT_EXECUTABLE}" describe ${hash} ${ARGN}
-		WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+		WORKING_DIRECTORY "${src_dir}"
 		RESULT_VARIABLE res
 		OUTPUT_VARIABLE out
 		ERROR_QUIET


CI: enable c++11 and stdthreads on android

--- ci-build.cmake
+++ ci-build.cmake
@@ -62,6 +62,8 @@

     set(OTHER
         ${CROSS}
+        -DCMAKE_CXX_FLAGS=-std=c++11
+        -DOGRE_CONFIG_THREAD_PROVIDER=std
         -DOGRE_DEPENDENCIES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/ogredeps)
     set(BUILD_DEPS TRUE)


vpr: add dijkstra delta delay calculation method

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- xc/common/cmake/arch_define.cmake
+++ xc/common/cmake/arch_define.cmake
@@ -61,6 +61,7 @@
   set(VPR_ARCH_ARGS "\
       --router_heap bucket \
       --clock_modeling route \
+      --place_delta_delay_matrix_calculation_method dijkstra \
       --place_delay_model delta_override \
       --router_lookahead connection_box_map \
       --quick_check_route on \


changed versioning scheme to conform to MITK and updated version number

--- Applications/mitkDiffusion/CPackOptions.cmake
+++ Applications/mitkDiffusion/CPackOptions.cmake
@@ -5,14 +5,14 @@
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MITK application for processing of MR diffusion imaging data.")
 # Major version is the year of release
 set(CPACK_PACKAGE_VERSION_MAJOR "2012")
-# Minor version is assigned depending on the number of releases that year, order is "", "a", "b"..., "z"
+# Minor version is the month of release
 set(CPACK_PACKAGE_VERSION_MINOR "")
 # Patch versioning is not intended to be done
 set(CPACK_PACKAGE_VERSION_PATCH "")

-# this should result in names like 2011, 2011a, ...
+# this should result in names like 2011.09, 2012.06, ...
 # version has to be set explicitly to avoid such things as CMake creating the install directory "MITK Diffusion 2011.."
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}${CPACK_PACKAGE_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")

 if(CMAKE_CL_64)
   set(CPACK_PACKAGE_FILE_NAME "MITK-Diffusion-${CPACK_PACKAGE_VERSION}-win64")


ENH: Bump jsoncpp version to eliminate warnings

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -37,7 +37,7 @@
 # ${svn_protocol}://svn.code.sf.net/p/jsoncpp/code/trunk/jsoncpp )
 # http://midas3.kitware.com/midas/download/bitstream/366544/JsonCpp_r276.tar.gz
 set( JsonCpp_URL ${git_protocol}://github.com/KitwareMedical/jsoncpp.git )
-set( JsonCpp_HASH_OR_TAG 34019a49daa7b7ee0692b6eeaf16df7dbdc3422a )
+set( JsonCpp_HASH_OR_TAG c60983f92dfdf4f0cd20b08874472b3388815b04 )

 # KWStyle
 set( KWStyle_URL


Minor cleanup.

Minor cleanup.

--- toolchains/osx.toolchain.cmake
+++ toolchains/osx.toolchain.cmake
@@ -41,13 +41,14 @@

 add_compile_options( -mmmx -mfpmath=sse -mcx16 )

-if ( LE_TARGET_ARCHITECTURE STREQUAL sse3 )
-    set( XCODE_ATTRIBUTE_CFLAGS_i386   "-msse3  -march=prescott -mtune=core2"  )
-    set( XCODE_ATTRIBUTE_CFLAGS_x86_64 "-mssse3 -march=core2    -mtune=corei7" )
-elseif ( LE_TARGET_ARCHITECTURE STREQUAL sse4.1 )
-    set( XCODE_ATTRIBUTE_CFLAGS_i386   "-msse4.1 -march=core2 -mtune=core2"  )
-    set( XCODE_ATTRIBUTE_CFLAGS_x86_64 "-msse4.1 -march=core2 -mtune=corei7" )
-endif()
+#...mrmlj...todo...
+#if ( <arch> STREQUAL sse3 )
+#    set( XCODE_ATTRIBUTE_CFLAGS_i386   "-msse3  -march=prescott -mtune=core2"  )
+#    set( XCODE_ATTRIBUTE_CFLAGS_x86_64 "-mssse3 -march=core2    -mtune=corei7" )
+#elseif ( <arch> STREQUAL sse4.1 )
+#    set( XCODE_ATTRIBUTE_CFLAGS_i386   "-msse4.1 -march=core2 -mtune=core2"  )
+#    set( XCODE_ATTRIBUTE_CFLAGS_x86_64 "-msse4.1 -march=core2 -mtune=corei7" )
+#endif()

 ################################################################################


PolysquareCommon: Don't double up option labels

--- PolysquareCommon.cmake
+++ PolysquareCommon.cmake
@@ -371,13 +371,12 @@
      DEPENDS)

 set (PSQ_ALL_SANITIZATION_OPTION_ARGS
-     ${PSQ_ALL_ACCELERATION_OPTION_ARGS}
      NO_ASAN
      NO_MSAN
      NO_TSAN
      NO_UBSAN)
 set (PSQ_ALL_SANITIZATION_MULTIVAR_ARGS
-     ${PSQ_ALL_ACCELERATION_OPTION_ARGS})
+     DEPENDS)

 set (PSQ_ALL_SOURCES_OPTION_ARGS
      ${PSQ_ALL_CHECKS_OPTION_ARGS})


Support forcing a run through external urls.

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -162,6 +162,24 @@
   endif()

   set(force_build ${initial_force_build})
+
+  # Check if a forced run was requested
+  set(cdash_remove_rerun_url )
+  if(NOT MITK_NO_CDASH_WEBADMIN)
+    set(cdash_rerun_url "http://mbits/rerun/${CTEST_BUILD_NAME}")
+    set(cdash_remove_rerun_url "http://mbits/rerun/rerun.php?name=${CTEST_BUILD_NAME}&remove=1")
+    file(DOWNLOAD
+         "${cdash_rerun_url}"
+         "${CTEST_BINARY_DIRECTORY}/tmp.txt"
+         STATUS status
+         )
+    list(GET status 0 error_code)
+    file(READ "${CTEST_BINARY_DIRECTORY}/tmp.txt" rerun_content LIMIT 1)
+    if(NOT error_code AND NOT rerun_content)
+      set(force_build 1)
+    endif()
+  endif()
+
   if(COMMAND MITK_OVERRIDE_FORCE_BUILD)
     MITK_OVERRIDE_FORCE_BUILD(force_build)
   endif()
@@ -185,6 +203,12 @@
   endif()

   if(res GREATER 0 OR force_build)
+
+    # Clear the forced rerun request
+    if(NOT MITK_NO_CDASH_WEBADMIN AND cdash_remove_rerun_url)
+      file(DOWNLOAD "${cdash_remove_rerun_url}" "${CTEST_BINARY_DIRECTORY}/tmp.txt")
+      file(REMOVE "${CTEST_BINARY_DIRECTORY}/tmp.txt")
+    endif()

     if(CTEST_PROJECT_NAME_SUPERBUILD)
       set(ctest_project_name_orig ${CTEST_PROJECT_NAME})


COMP: Reduce deathstar parallel jobs.

COMP: Reduce deathstar parallel jobs.

Lower memory usage.

Change-Id: I98c39309dc00eb352a70445b2df53de2b47a8770

--- Deathstar_Kitware_TubeTK_Nightly.cmake
+++ Deathstar_Kitware_TubeTK_Nightly.cmake
@@ -38,7 +38,7 @@

 set( ENV{DISPLAY} ":0" )

-set( SITE_MAKE_COMMAND "make -j2" )
+set( SITE_MAKE_COMMAND "make -j1" )
 set( SITE_CMAKE_COMMAND "/usr/local/bin/cmake" )
 set( SITE_QMAKE_COMMAND "/home/matt/apps/QtSDK/Desktop/Qt/474/gcc/bin/qmake" )
 set( SITE_CTEST_COMMAND "/usr/local/bin/ctest -j3" )


Removed debug statements from new python libs finder

git-svn-id: ffca00f6b2b5e7f8fb5019f1580256971ea3f277@2811 fa922fa7-2fde-0310-acd8-f43f465a7996

--- CMake/hoomd/HOOMDPythonSetup.cmake
+++ CMake/hoomd/HOOMDPythonSetup.cmake
@@ -37,7 +37,6 @@
 else (ENABLE_STATIC)
     get_filename_component(_python_lib_first ${_python_dynamic_lib_name} NAME)
 endif (ENABLE_STATIC)
-message(STATUS "searching for first: " ${_python_lib_first})

 # add a blank suffix to the beginning to find the Python framework
 set(_old_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
@@ -50,8 +49,6 @@
              )
 set(${CMAKE_FIND_LIBRARY_SUFFIXES} _old_suffixes)

-message(STATUS "python library " ${PYTHON_LIBRARY})
-
 MARK_AS_ADVANCED(
   PYTHON_LIBRARY
   PYTHON_INCLUDE_DIR
@@ -60,3 +57,5 @@
 SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
 SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")

+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)