# HG changeset patch # User David Nadlinger # Date 1295135781 -3600 # Node ID e40f33cc0bf5bcc28a6371dc6d35e98e9c8481bf # Parent aa08a72d480ae384e2259f5c3d139eadc8571005 Explicitly include qglobal.h before all the ?master includes?. This makes sure that macros like Q_CORE_EXPORT are already defined for all parsed header files. Starting with this commit, QtD should build successfully against the pre-built Cocoa packages on OS X 10.6. diff -r aa08a72d480a -r e40f33cc0bf5 generator/CMakeLists.txt --- a/generator/CMakeLists.txt Sat Jan 15 22:52:06 2011 +0100 +++ b/generator/CMakeLists.txt Sun Jan 16 00:56:21 2011 +0100 @@ -200,6 +200,14 @@ OR NOT EXISTS ${jambi_inc}) file(REMOVE ${dgen_build_conf}) file(REMOVE ${jambi_inc}) + + # Explicitly include qglobal.h before all the »master includes« to make + # sure Q_CORE_EXPORT and other macros are already defined for all + # processed headers. Otherwise, the parser would choke on classes in files + # included before "qglobal.h" in using one of these macros + # (e.g. QXmlStreamReader). + file(APPEND ${jambi_inc} "#include <${QT_QTCORE_INCLUDE_DIR}/qglobal.h>") + file(APPEND ${dgen_build_conf} "\n") foreach(package_normal ${packages}) string(TOLOWER ${package_normal} package)