Skip to content

Commit

Permalink
move generation of qconfig.h forwarding headers to qtbase.pro
Browse files Browse the repository at this point in the history
less platform-specific code. the qfeatures.h generation is already here.

Change-Id: Ied69fb431eed5816fbff63b33be431ee913c2bc8
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
ossilator authored and The Qt Project committed Feb 28, 2014
1 parent 46feffe commit 1345534
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 34 deletions.
17 changes: 0 additions & 17 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6438,23 +6438,6 @@ else
mv -f "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
fi

# create a forwarding header
mkdir -p "$outpath/include/QtCore" || exit
echo '#include "../../src/corelib/global/qconfig.h"' > $outpath/include/QtCore/qconfig.h.new
if cmp -s "$outpath/include/QtCore/qconfig.h.new" "$outpath/include/QtCore/qconfig.h"; then
rm -f "$outpath/include/QtCore/qconfig.h.new"
else
mv "$outpath/include/QtCore/qconfig.h.new" "$outpath/include/QtCore/qconfig.h" || exit
fi

# create a camelcase forwarding header
echo '#include "qconfig.h"' > $outpath/include/QtCore/QtConfig.new
if cmp -s "$outpath/include/QtCore/QtConfig.new" "$outpath/include/QtCore/QtConfig"; then
rm -f "$outpath/include/QtCore/QtConfig.new"
else
mv "$outpath/include/QtCore/QtConfig.new" "$outpath/include/QtCore/QtConfig" || exit
fi

#-------------------------------------------------------------------------------
# save configuration into qconfig.pri
#-------------------------------------------------------------------------------
Expand Down
8 changes: 8 additions & 0 deletions qtbase.pro
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ FEATURES_PRI = \
"QT_DISABLED_FEATURES = \$\$unique(QT_DISABLED_FEATURES)"
write_file($$OUT_PWD/mkspecs/qfeatures.pri, FEATURES_PRI)|error("Aborting.")

# Create forwarding headers for qconfig.h
FWD_QCONFIG_H = \
'$${LITERAL_HASH}include "../../src/corelib/global/qconfig.h"'
write_file($$OUT_PWD/include/QtCore/qconfig.h, FWD_QCONFIG_H)|error("Aborting.")
FWD_QTCONFIG = \
'$${LITERAL_HASH}include "qconfig.h"'
write_file($$OUT_PWD/include/QtCore/QtConfig, FWD_QTCONFIG)|error("Aborting.")

#mkspecs
mkspecs.path = $$[QT_HOST_DATA]/mkspecs
mkspecs.files = \
Expand Down
17 changes: 0 additions & 17 deletions tools/configure/configureapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3520,23 +3520,6 @@ void Configure::generateConfigfiles()
dictionary[ "DONE" ] = "error";
}

{
FileWriter tmpStream(buildPath + "/include/QtCore/qconfig.h");

tmpStream << "#include \"../../src/corelib/global/qconfig.h\"" << endl;

if (!tmpStream.flush())
dictionary[ "DONE" ] = "error";
}
{
FileWriter tmpStream(buildPath + "/include/QtCore/QtConfig");

tmpStream << "#include \"qconfig.h\"" << endl;

if (!tmpStream.flush())
dictionary[ "DONE" ] = "error";
}

if (dictionary["EDITION"] == "Evaluation" || qmakeDefines.contains("QT_EVAL")) {
FileWriter tmpStream(buildPath + "/src/corelib/global/qconfig_eval.cpp");

Expand Down

0 comments on commit 1345534

Please sign in to comment.