summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2008-01-29 00:20:00 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2008-01-29 00:20:00 (GMT)
commit404db8811e4d6dc8ed89f4b1e3efafbb5985dc44 (patch)
tree3441ed6c7b27c50987340c8130f2049c690e9bb1 /Modules/FindQt4.cmake
parente75932b61f6f40531c70694b14c7e068a94d8da9 (diff)
downloadCMake-404db8811e4d6dc8ed89f4b1e3efafbb5985dc44.zip
CMake-404db8811e4d6dc8ed89f4b1e3efafbb5985dc44.tar.gz
CMake-404db8811e4d6dc8ed89f4b1e3efafbb5985dc44.tar.bz2
ENH: Improve find for glib/gthread when Qt is configured to use it.
Fixes #6220.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake30
1 files changed, 24 insertions, 6 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 72c6e9d..bbfb69e 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1312,12 +1312,30 @@ IF (QT4_QMAKE_FOUND)
## glib
IF(QT_QCONFIG MATCHES "glib")
- # Qt less than Qt 4.2.0 doesn't use glib
- # Qt 4.2.0 uses glib-2.0 (wish we could ask Qt that it uses 2.0)
- FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0)
- FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0)
- SET(QT_CORE_LIB_DEPENDENCIES ${QT_CORE_LIB_DEPENDENCIES}
- ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY})
+ # Qt 4.2.0+ uses glib-2.0
+ EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L glib-2.0 gthread-2.0
+ OUTPUT_VARIABLE _glib_query_output
+ RESULT_VARIABLE _glib_result
+ ERROR_VARIABLE _glib_query_output )
+
+ IF(_glib_result MATCHES 0)
+ STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}")
+ SEPARATE_ARGUMENTS(_glib_query_output)
+ ELSE(_glib_result MATCHES 0)
+ SET(_glib_query_output)
+ MESSAGE(WARNING "When querying pkg-config for glib-2.0. An error was reported:\n${_glib_query_output}")
+ ENDIF(_glib_result MATCHES 0)
+
+ FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 PATHS ${_glib_query_output} )
+ FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 PATHS ${_glib_query_output} )
+
+ IF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY)
+ MESSAGE(WARNING "Unable to find glib 2.0 to satisfy Qt dependency.")
+ ELSE(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY)
+ SET(QT_CORE_LIB_DEPENDENCIES ${QT_CORE_LIB_DEPENDENCIES}
+ ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY})
+ ENDIF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY)
+
MARK_AS_ADVANCED(QT_GLIB_LIBRARY)
MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY)
ENDIF(QT_QCONFIG MATCHES "glib")
pan> | | | | | | | | | | | xml.sax.saxutils.XMLGenerator as being bound to http://www.w3.org/XML/1998/namespace. Patch by Troy J. Farrell. * | | #5975: add unix_dialect to csv module.Georg Brandl2010-10-271-0/+9 | | | * | | logging: Improved Formatter implementation.Vinay Sajip2010-10-261-0/+17 | | | * | | logging: Added style option to Formatter to allow %, {} or himBHformatting.Vinay Sajip2010-10-251-0/+48 | | | * | | test_gdb should be skipped on darwin (not up to v7 yet)Skip Montanaro2010-10-251-0/+1 | | | * | | Issue #10161: test_pep277 formats filenames with ascii() on errorVictor Stinner2010-10-241-1/+1 | | | | | | | | | | | | | | | As suggested by Antoine, it's better to patch only test_pep277 than the unittest module. * | | Add a new warning gategory, ResourceWarning, as discussed on python-dev. It ↵Georg Brandl2010-10-242-3/+6 | | | | | | | | | | | | | | | | | | | | | | | | is silent by default, except when configured --with-pydebug. Emit this warning from the GC shutdown procedure, rather than just printing to stderr. * | | Remove usage of exception indexing.Georg Brandl2010-10-241-1/+1 | | | * | | Issue 5178: Add tempfile.TemporaryDirectory (original patch by Neil Schemenauer)Nick Coghlan2010-10-241-1/+103 | | | * | | remove broken code accounting an offset the size of the line #10186Benjamin Peterson2010-10-241-0/+6 | | | * | | Revert r85801. The test ought to pass without rounding.Martin v. Löwis2010-10-231-1/+1 | | | * | | Follow up to #9778: fix regressions on 64-bit Windows buildsAntoine Pitrou2010-10-231-1/+1 | | | * | | #6518: enable context manager protocol for ossaudiodev types.Georg Brandl2010-10-231-4/+6 | | | * | | Also guard other SOCK_NONBLOCK testAntoine Pitrou2010-10-231-9/+13 | | | * | | Fix SOCK_CLOEXEC and SOCK_NONBLOCK tests on recent glibcs with old Linux ↵Antoine Pitrou2010-10-231-0/+18 | | | | | | | | | | | | kernels. * | | Try to fix test_tarfile on AMD64 debian parallel 3.xVictor Stinner2010-10-231-1/+1 | | | | | | | | | | | | | | | tarinfo.mtime is an int, whereas getmtime() is a float and it might be different by something like 3 µs. * | | Revert r85797 (and r85798): it broke the Windows buildbots because ofAntoine Pitrou2010-10-221-20/+1 | | | | | | | | | | | | test_multiprocessing's misbehaviour. * | | Issue #9935: Speed up pickling of instances of user-defined classes.Antoine Pitrou2010-10-221-1/+20 | | | * | | Fix test_ssl on Ubuntu buildbot with patched OpenSSLAntoine Pitrou2010-10-221-0/+1 | | | * | | Issue #5639: Add a *server_hostname* argument to `SSLContext.wrap_socket`Antoine Pitrou2010-10-222-4/+45 | | | | | | | | | | | | | | | | | | in order to support the TLS SNI extension. `HTTPSConnection` and `urlopen()` also use this argument, so that HTTPS virtual hosts are now supported. * | | #10166: rewrite self-recursion to iteration in pstats.Stats.add(). Also add ↵Georg Brandl2010-10-222-3/+16 | | | | | | | | | | | | a unittest and a stats test file. * | | Issue #10089: Add support for arbitrary -X options on the command-line.Antoine Pitrou2010-10-211-0/+9 | | | | | | | | | | | | They can be retrieved through a new attribute `sys._xoptions`. * | | #10159: sort completion matches before comparing to dir() result.Georg Brandl2010-10-211-2/+2 | | | * | | Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead ofVictor Stinner2010-10-201-0/+32 | | | | | | | | | | | | | | | | | | | | | the locale encoding. If the LANG (and LC_ALL and LC_CTYPE) environment variable is not set, the locale encoding is ISO-8859-1, whereas most programs (including Python) expect UTF-8. Python already uses UTF-8 for the filesystem encoding and to encode command line arguments on this OS. * | | Move non-ascii test from test_run_code() to a new function: test_non_ascii()Victor Stinner2010-10-201-7/+9 | | | * | | Move test_undecodable_code() from test_sys to test_cmd_lineVictor Stinner2010-10-202-38/+38 | | | * | | test_zipimport_support: use ascii() on bytes output to avoid BytesWarningVictor Stinner2010-10-201-2/+2 | | | | | | | | | | | | The test failed with python -bb. * | | Fix r85728: use "" to mean the system default locale, which should work on ↵Georg Brandl2010-10-20