Mercurial > projects > qtd
comparison generator/CMakeLists.txt @ 399:e40f33cc0bf5
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.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sun, 16 Jan 2011 00:56:21 +0100 |
parents | aa08a72d480a |
children | a81c53f7b83b |
comparison
equal
deleted
inserted
replaced
398:aa08a72d480a | 399:e40f33cc0bf5 |
---|---|
198 if( NOT "${packages_in_build_txt}" STREQUAL "${packages}" | 198 if( NOT "${packages_in_build_txt}" STREQUAL "${packages}" |
199 OR NOT EXISTS ${dgen_build_conf} | 199 OR NOT EXISTS ${dgen_build_conf} |
200 OR NOT EXISTS ${jambi_inc}) | 200 OR NOT EXISTS ${jambi_inc}) |
201 file(REMOVE ${dgen_build_conf}) | 201 file(REMOVE ${dgen_build_conf}) |
202 file(REMOVE ${jambi_inc}) | 202 file(REMOVE ${jambi_inc}) |
203 | |
204 # Explicitly include qglobal.h before all the »master includes« to make | |
205 # sure Q_CORE_EXPORT and other macros are already defined for all | |
206 # processed headers. Otherwise, the parser would choke on classes in files | |
207 # included before "qglobal.h" in <QtCore/QtCore> using one of these macros | |
208 # (e.g. QXmlStreamReader). | |
209 file(APPEND ${jambi_inc} "#include <${QT_QTCORE_INCLUDE_DIR}/qglobal.h>") | |
210 | |
203 file(APPEND ${dgen_build_conf} "<typesystem>\n") | 211 file(APPEND ${dgen_build_conf} "<typesystem>\n") |
204 foreach(package_normal ${packages}) | 212 foreach(package_normal ${packages}) |
205 string(TOLOWER ${package_normal} package) | 213 string(TOLOWER ${package_normal} package) |
206 string(TOUPPER ${package_normal} package_upper) | 214 string(TOUPPER ${package_normal} package_upper) |
207 file(APPEND ${dgen_build_conf} " <load-typesystem name=\"typesystem_${package}.xml\" generate=\"yes\" />\n") | 215 file(APPEND ${dgen_build_conf} " <load-typesystem name=\"typesystem_${package}.xml\" generate=\"yes\" />\n") |