configure: Add define on whether QT_COORD_TYPE is float or double

This way we can identify whether the type is float or double or
something else in the preprocessor. This is helpful for identifying the
primitive types available to QML.

Change-Id: I635f01cb888b9a6a5b35c3f1cbd6e66ff8a65beb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
bb10
Ulf Hermann 2024-04-17 15:59:06 +02:00
parent 7a62c96238
commit 175839695d
1 changed files with 5 additions and 0 deletions

View File

@ -1018,6 +1018,11 @@ qt_feature("qreal"
)
qt_feature_definition("qreal" "QT_COORD_TYPE" VALUE "${QT_COORD_TYPE}")
qt_feature_definition("qreal" "QT_COORD_TYPE_STRING" VALUE "\"${QT_COORD_TYPE}\"")
if(QT_COORD_TYPE STREQUAL "double")
qt_feature_definition("qreal" "QT_COORD_TYPE_IS_DOUBLE" VALUE "1")
elseif(QT_COORD_TYPE STREQUAL "float")
qt_feature_definition("qreal" "QT_COORD_TYPE_IS_FLOAT" VALUE "1")
endif()
qt_feature("gui" PRIVATE
LABEL "Qt Gui"
)