Commit Graph

272 Commits

Author SHA1 Message Date
Stephen Kelly 37a28ffa36 Fix the number variable comparison when Qt is not found. 2012-05-03 17:40:04 +02:00
David Faure 1dfe15c431 Abort FindQt4.cmake if Qt 5 is found. 2012-05-03 16:47:07 +02:00
Clinton Stimpson cbdfcc6515 FindQt4: clarify warning message about incorrect Qt installation.
Fixes bug #12915.
Thanks Laurent Rineau and Brad King for input.
2012-02-08 18:40:55 -07:00
Mike McQuaid cf4b52980d Add QT_LIBRARIES_PLUGINS variable to UseQt4. 2011-10-03 11:01:39 -06:00
Clinton Stimpson a67be31784 qt4: also find QtUiTools when cross compiling with mingw. 2011-08-29 08:23:44 -06:00
Clinton Stimpson de30173d5b Remove C compiler requirement from FindQt4.cmake
Use the new check_cxx_symbol_exists instead of check_symbol_exists.
Also remove a debug message from CheckSymbolExists.cmake.
2011-07-28 12:15:46 -06:00
Brad King df7a95629c Merge topic 'qt4-apple-framework-fix'
702538e Qt4: Fix reference of undefined variable when detecting frameworks on Mac OS X
2011-07-26 14:57:48 -04:00
Clinton Stimpson 702538eaa3 Qt4: Fix reference of undefined variable when detecting frameworks on Mac OS X 2011-07-25 12:30:30 -06:00
Clinton Stimpson 0ae8a3405b Add qt4/QtCore to help find Qt headers when cross-compiling. 2011-07-22 13:38:36 -06:00
Clinton Stimpson e7f05d9759 Add imported targets support for frameworks on Mac. 2011-06-13 17:21:41 -06:00
Markus Rathgeb 46f64bd9e7 When cross compiling, don't double-root paths when using find_*. 2011-03-10 14:17:13 -07:00
Clinton Stimpson 6b9bc54566 Fix regression in 43cb9b8.
Put back some code for setting the QT_VERSION_* variables that wasn't supposed to be removed.
2011-02-23 17:13:49 -07:00
Brad King 62f816adde Merge topic 'qt4-fphsa'
7a1027a When checking find_package() components, special case qtmain.
4c1c358 FindQt4: Include builtin FindPackageHandleStandardArgs directly
43cb9b8 Change to use fphsa to check required variables and version.
2011-02-22 14:36:33 -05:00
Clinton Stimpson 4167be052f Fix issues with find_path() for QtCore include dir on Mac. Fixes 11868. 2011-02-19 15:30:02 -07:00
Clinton Stimpson 7a1027a1b6 When checking find_package() components, special case qtmain.
Its just a library on Windows only.
Fixes bug #11791.
2011-02-04 09:01:55 -05:00
Brad King 4c1c358332 FindQt4: Include builtin FindPackageHandleStandardArgs directly
Apply to FindQt4 change from commit b0118402 (Use absolute path to
FindPackageHandleStandardArgs.cmake everywhere, 2010-09-28).
2011-01-20 11:46:32 -05:00
Clinton Stimpson 858fe0ed41 Replace exec_program with execute_process for qmake queries. 2011-01-17 19:14:22 -07:00
Clinton Stimpson 43cb9b8276 Change to use fphsa to check required variables and version.
Also, set the required variables based on components, if specified.
Also, don't make finding uic required if not using QtGui.
2011-01-14 21:26:19 -07:00
Clinton Stimpson e6bb8c7a6e Add support for using static/dynamic Qt plugins. 2011-01-01 11:45:05 -07:00
Clinton Stimpson cfba5ef111 Fix regression in 2dae2f1 which added find of Qt imports dir. 2010-10-15 16:36:14 -06:00
Clinton Stimpson 2dae2f1a0b Find imports dir in Qt 4.7 2010-10-08 20:55:55 -06:00
Brad King c86d677fe0 Merge topic 'findqt4-cross-compile'
25931ae Fix regression in cross-compile patches with finding Qt libs.
2010-09-28 14:03:37 -04:00
Clinton Stimpson 25931ae10e Fix regression in cross-compile patches with finding Qt libs.
If a Qt installation is in CMAKE_PREFIX_PATH and a
QT_QMAKE_EXECUTABLE points to a qmake for a different Qt installation,
prefer finding libs in the latter Qt installation.
2010-09-23 16:50:09 -06:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Clinton Stimpson c0194278ac Fix mingw/VS warning message with cross compile re-org. 2010-07-15 10:23:32 -06:00
Clinton Stimpson 7fd3739ce7 Find correct Qt plugins for cross-compiling. 2010-07-06 14:37:16 -06:00
Clinton Stimpson ff888dd648 Fix some issues with refinding when qmake executable is changed. 2010-07-06 13:24:53 -06:00
Clinton Stimpson 22e725fb88 Tweak for cygwin, don't convert : to ; 2010-07-03 08:58:25 -06:00
Clinton Stimpson b55da4c688 Add cross-compiling support to FindQt4.cmake 2010-07-02 15:47:07 -06:00
Clinton Stimpson 1f608718fc Remove macro for querying qmake for qmake variables.
Remove last place for querying qmake values.
Also removed internal macro to support querying qmake.
Depends on findthreads-irix topic.
2010-06-12 13:00:08 -06:00
Clinton Stimpson 61ad5242b7 Change to use FindX11.cmake. Should fix #9929. 2010-03-17 10:48:05 -06:00
Clinton Stimpson bd0b37ea3d ENH: Clarify a doc string. Fixes #10358. 2010-03-17 07:43:22 -06:00
Clinton Stimpson 70290e1f64 Add support for QtDeclartive module. 2010-02-17 19:12:18 -05:00
Alexander Neundorf 03769801ff -make the imported targets feature of FindQt4.cmake fully backwards compatible
After discussing with Brad and Clinton:
-the namespace for the imported targets is now "Qt4::", tested with Makefiles, Visual Studio and XCode projects
-the imported targets are always created
-if QT_USE_IMPORTED_TARGETS is set to TRUE (it defaults to FALSE), the QT_QTFOO_LIBRARY variables are set to point to these imported
targets, otherwise the old behaviour is used.
-on OSX if Qt has been found as framework, disable QT_USE_IMPORTED_TARGETS, since cmake doesn't handle the framework directory as location of the library correctly

Alex
2010-01-18 16:23:21 -05:00
Alexander Neundorf 1833961ce5 some tweaks as suggested by Brad (no functional changes)
-set the type of the IMPORTED libraries to UNKNOWN, this way also on Windows
only the "LOCATION" property has to be set
-the if() around the SET(QT_${basename}_FOUND 1) was useless (always true)
-the mapping of the configuration types DEBUG and PROFILE did not belong here

Alex
2010-01-18 13:38:38 -05:00
Alexander Neundorf 6d39313001 -create imported library targets for the Qt4 libs
This commit syncs FindQt4.cmake again with KDEs version.
Now for every Qt library an imported target with the name
Qt4ImportedTarget__<LIBNAME> is created.
This way we can now finally handle the release and debug versions of the Qt
libraries correctly.
Also, if a Qt-using project A installs a file with exported targets, these
targets now depend on the imported Qt targets, e.g.
Qt4ImportedTarget__QtCore. The location of QtCore is then resolved at
buildtime of project B, which uses the exported targets from project A.
 Before this patch the full path to the QtCore on the original build machine
of project A was stored, so this had to match the directory layout on the
build machine for project B.

Alex
2010-01-17 11:37:53 -05:00
Clinton Stimpson 55a3967eda Fix bug #10114. Find phonon on some installations. 2010-01-13 17:34:31 -05:00
Alexander Neundorf ffbae660cd fix logic of _QT4_ADJUST_LIB_VARS() wrt. release- and debug libraries
Now the case that both the release- and the debug-version of a library is
handled first, because otherwise we always ran into this branch, since the
debug-only and the release-only branch also set both variables.

Alex
2009-12-23 09:58:34 -05:00
Alexander Neundorf a2c62d402c sync with KDE: sort the libs alphabetically
Alex
2009-12-20 10:34:13 -05:00
Alexander Neundorf 4740bf6b3e -add support for QtMultimedia and some sync with KDE
-the QtMultimedia module is new since Qt 4.6.0
-sort the doc entries alphabetically

Alex
2009-12-20 09:06:42 -05:00
Alexander Neundorf eb83c19789 -better support for Qt4 as frameworks
before this patch -F<framework> dir had to be added manually in some way
when using Qt4 installed as framework and when using FindQt4.cmake directly,
i.e. without UseQt4.cmake. With this patch the framework dir is
automatically added to QT_INCLUDE_DIR when Qt is installed as a framework.

Ok by Clinton, tested already in KDE by Mike Arthur.

Alex
2009-12-16 17:16:59 -05:00
Alexander Neundorf 1d9cb15513 also provide QT_DESIGNER_EXECUTABLE and QT_LINGUIST_EXECUTABLE
Alex
2009-11-23 17:53:50 -05:00
Clinton Stimpson f756b73ac5 Don't search for QtMotif on all platforms - only on X11. 2009-11-17 14:44:33 -05:00
Alexander Neundorf 0f457937f4 Split some logic of FindQt4.cmake into separate files, which are included automatically.
Qt4Macros.cmake: all the "public" macros of FindQt4.cmake
Qt4ConfigDependentSettings.cmake: the code for detecting the
Qt-configuration dependent additional libraries, e.g. when linking statically.

There should be no functional changes in this patch.
The patch reduces the length of FindQt4.cmake from 1700 lines to around 1000
lines, which is still long enough, but this should make the file a easier to
handle (and it is similar to what we do in KDE with FindKDE4Internal.cmake
and KDE4Macros.cmake)

Ok by Clinton.

Alex
2009-11-15 13:02:19 -05:00
Alexander Neundorf fb8d583054 also search for "qmake-mac", which is installed by macports (http://lists.kde.org/?l=kde-core-devel&m=125797773120427&w=2)
Alex
2009-11-12 12:55:19 -05:00
Alexander Neundorf 35a209b0db Search for the header QtAssistant for QT_QTASSISTANT_INCLUDE_DIR instead of QtAssistantClient
This should not change the result (since both should be in the same
directory), but seems a bit more logical and is also in sync with what is done in the KDE version.

Alex
2009-11-10 13:57:21 -05:00
Alexander Neundorf 4a2f809124 Sort documentation entries better and move mark_as_advanced() a bit back
Alex
2009-11-09 12:55:46 -05:00
Alexander Neundorf 054eed5819 -another tiny sync with KDE4, no functional changes
Alex
2009-11-08 13:21:09 -05:00
Alexander Neundorf e325b1a38a some syncing with FindQt4.cmake from KDE, no functional changes
-the mark_as_advanced() calls for the variables coming from qmake are now in
the corresponding section, and not in the section where the include dirs are
foudn

Alex
2009-11-08 13:01:46 -05:00
Clinton Stimpson cff3a4420b Check for openssl-linked option with Qt 4.4+ before making ssl a dependency. 2009-10-07 18:51:39 -04:00
Clinton Stimpson bca63bb738 When getting include dirs for moc, also watch for framework includes and use -F instead of -I. 2009-10-05 11:21:30 -04:00
Alexander Neundorf e364dc784f some syncing with the FindQt4.cmake from KDE
-remove the parentheses in the if() conditions, they don't change the
result, and without them these lines are identical to the ones in
FindQt4.cmake from KDE
-mention which qmake was used for finding Qt

Alex
2009-10-04 11:31:30 -04:00
Alexander Neundorf 3563e6f44e -add the additional features for the dbus macros from KDE's FindQt4.cmake
Alex
2009-10-03 12:04:15 -04:00
Alexander Neundorf 61a1ec5f20 document how the minimum version can be specified
Alex
2009-10-01 16:48:19 -04:00
Clinton Stimpson 86459a89a1 Add documentation for Cocoa flag and move Motif under X11 flag. 2009-10-01 16:41:00 -04:00
Brad King c4bb9c9d42 Convert CMake find-modules to BSD License
This adds copyright/license notification blocks CMake's find-modules.
Many of the modules had no notices at all.  Some had notices referring
to the BSD license already.  This commit normalizes existing notices and
adds missing notices.
2009-09-28 11:45:50 -04:00
Clinton Stimpson 36606b6d73 add support for finding qcollectiongenerator executable. fixes #9248. 2009-09-22 18:44:24 -04:00
Clinton Stimpson 3551bc31f1 Add support for Qt configured with custom qtlibinfix (see issue 9571). Also fix CMP 15 warnings. 2009-09-22 16:28:13 -04:00
Clinton Stimpson ad5a455bb5 Fix issue 9581. Qt 4.5+ needs gobject-2.0. 2009-09-21 23:07:44 -04:00
Clinton Stimpson d6e8ffa927 use -o flag instead of > for qdbuscpp2xml 2009-09-01 15:21:06 -04:00
Clinton Stimpson e13176e92b BUG: fix relative paths from different drives on Windows 2009-07-16 18:53:20 -04:00
Clinton Stimpson c171d57ed0 ENH: Better error message for those who switch from Qt3 to Qt4 and don't clean their cache file. 2009-05-19 11:38:18 -04:00
Clinton Stimpson 22f1c78677 BUG: Fix spaces in file paths for lupdate command 2009-05-06 11:21:22 -04:00
Clinton Stimpson 2d22e11a4a ENH: Add support for QtScriptTools in Qt 4.5. 2009-05-06 09:44:36 -04:00
Clinton Stimpson f4f5da869c ENH: Add support for QtScriptTools in Qt 4.5. 2009-05-06 09:42:01 -04:00
Clinton Stimpson ff561cd1d3 ENH: Do a recheck of QT_MAC_USE_COCOA when qmake executable changes. 2009-03-26 11:04:18 -04:00
Clinton Stimpson 6a6ade8de2 ENH: Support OUTPUT_LOCATION property for qm files.
Fixes #8492.
2009-03-25 15:29:46 -04:00
Clinton Stimpson 55a6042d9c BUG: Need to fix find of qtmain library when qmake executable is changed. 2009-03-19 15:44:54 -04:00
Alexander Neundorf bc8f2f50a8 ENH: add patch from Debian, which adds support lrelease-qt4 and lupdate-qt4
http://patch-tracking.debian.net/patch/series/view/cmake/2.6.3-1/FindQt4_qt4_lupdate_lrelease.diff

Alex
2009-02-25 16:29:29 -05:00
Clinton Stimpson 08ca8f5053 ENH: Support COMPONENTS argument to find_package().
See bug #8542.
2009-02-19 16:04:57 -05:00
Clinton Stimpson abdcf91422 ENH: Support version argument in find_package().
See bug #8542.
2009-02-19 15:51:43 -05:00
Clinton Stimpson 2b4a472e81 ENH: Allowing finding a relocated Qt installation which contains a qt.conf to override the hardcoded paths in qmake.
Fixes #8532.
2009-02-13 18:52:02 -05:00
Clinton Stimpson 54e258414d ENH: Change FILEPATH to STRING for a list of libraries. 2009-02-10 18:13:24 -05:00
Clinton Stimpson dda19cd36f ENH: Support .hpp with automoc. 2009-02-09 16:42:19 -05:00
Clinton Stimpson f26c235aba BUG: When detecting if qmake executable is changed, don't error if path
contains regex chars.
2009-02-07 12:23:02 -05:00
Clinton Stimpson 56ade2af43 ENH: Add support for building with Qt's ActiveX support on Windows. 2009-02-05 23:01:38 -05:00
Clinton Stimpson f9710e22ec ENH: Also find .moc files if there are spaces between # and include.
Fixes #8433.
2009-01-29 13:26:01 -05:00
Clinton Stimpson aad46d7989 BUG: Fixed recent regression when finding some includes. 2009-01-26 10:12:37 -05:00
Clinton Stimpson b2d52b07ad ENH: Add convenience for identifying Cocoa based Qt. 2009-01-23 16:52:15 -05:00
Clinton Stimpson 515ce9315d BUG: Fix for #8247.
Add QT_TRANSLATIONS_DIR pointing to the Qt translation files, and docs for it.
      Also add docs for QT_BINARY_DIR.
2008-12-15 18:48:48 -05:00
Clinton Stimpson 25eeb3c47c BUG: Revert 1.138. 2008-11-25 16:56:44 -05:00
Clinton Stimpson e8e4160cce BUG: Fix #7969. Fix moc output files if source dir contains regex characters. 2008-11-05 17:56:55 -05:00
Clinton Stimpson 66db462bbe BUG: Fix find of assistant on Mac. 2008-10-24 17:48:35 -04:00
Clinton Stimpson f33943036e BUG: Fix regression in finding QtAssistant 2008-10-20 13:31:50 -04:00
Clinton Stimpson b82eb2b9b3 ENH: better way to find uic and moc. 2008-10-15 18:05:07 -04:00
Clinton Stimpson 9b2744f6fe ENH: When changing the qmake pointed to, re-find all of Qt's includes, libraries, etc...
This makes it much easier to switch between Qt versions.
2008-10-13 22:12:54 -04:00
Clinton Stimpson ca8c4ea4a6 BUG: Fix find of dbus dependency in Qt 4.4 2008-10-13 19:39:47 -04:00
Clinton Stimpson db0e1fd675 ENH: Fix #7784. Fix link of glib when needed. 2008-10-07 10:35:22 -04:00
Clinton Stimpson 33e87980cb ENH: Fix #7433. Put list of files in a .pro file and call lupdate on it,
instead of putting the list of files on the command line.
2008-09-22 15:00:31 -04:00
Clinton Stimpson ae9f9e6994 BUG: remove debug statements. 2008-09-22 14:00:37 -04:00
Clinton Stimpson 139cae931e ENH: For #7433, add a bit more documentation and add ability
to specify extra flags to lupdate.
2008-09-18 10:56:58 -04:00
Clinton Stimpson 87a31b5b7f ENH: For #7433, add documentation that directories also can be specified to
update the translation files.
2008-08-30 09:39:33 -04:00
Clinton Stimpson 5990594331 ENH: Add comments about pre-processor defines and moc. 2008-08-26 16:04:36 -04:00
Clinton Stimpson 263a4229e5 ENH: Use COMPILE_DEFINTIONS instead of DEFINITIONS. 2008-08-26 11:50:15 -04:00
Clinton Stimpson 607e4eb4b4 ENH: Add -DWIN32 for moc on Windows. Final fix for #7465. 2008-08-26 11:22:27 -04:00
Clinton Stimpson dbdca3440a ENH: Add -D preprocessor defines to the moc commands.
Needed to fix #7465.
2008-08-25 19:41:56 -04:00
Alexander Neundorf 502841c974 BUG: fix closing IF()
Alex
2008-08-17 05:11:51 -04:00
Alexander Neundorf db4bebe5c8 BUG: fix #7447, FindModulesExecuteAll test fails if both Qt3 and KDE4 can be
found in the system

Qt3 and Qt4 cannot be used together in one project.
Now Qt3/KDE3 and Qt4/KDE4 handle the case that this is done nevertheless
properly, i.e. they fail with FATAL_ERROR if it was REQUIRED and they fail
with just MESSAGE(STATUS ...) and RETURN() if it was not REQUIRED

BUG: make FindQt4 error out with FATAL_ERROR also if it was searched QUIET

Alex
2008-08-16 19:11:53 -04:00
Clinton Stimpson 65ad7ba830 BUG: Watch for empty qconfig.pri files. Fixes #7287. 2008-07-05 11:57:57 -04:00
Clinton Stimpson dcdcd00ffa BUG: Fix for #7118.
Relative paths going outside the current source dir resulted in badly
      placed moc source files in the build dir (or out of the build dir).
2008-06-06 01:36:39 -04:00