CMake: Implement configure -qreal <type>
The configure argument -qreal <type> maps to the CMake argument -DQT_COORD_TYPE=<type>. Fixes: QTBUG-83325 Change-Id: I94970f31ccfb241b1dd4f1d9b6cef25d6684dc05 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
3911be6160
commit
5f729da74a
@ -142,6 +142,10 @@ else()
|
||||
set(QT_STAGING_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
endif()
|
||||
|
||||
if(PROJECT_NAME STREQUAL "QtBase")
|
||||
set(QT_COORD_TYPE double CACHE STRING "Type of qreal")
|
||||
endif()
|
||||
|
||||
function(qt_internal_set_up_global_paths)
|
||||
# Compute the values of QT_BUILD_DIR, QT_INSTALL_DIR, QT_CONFIG_BUILD_DIR, QT_CONFIG_INSTALL_DIR
|
||||
# taking into account whether the current build is a prefix build or a non-prefix build,
|
||||
|
@ -652,7 +652,7 @@ CONFIG += ${private_config_joined}
|
||||
string(APPEND content "PKG_CONFIG_EXECUTABLE = ${PKG_CONFIG_EXECUTABLE}\n")
|
||||
endif()
|
||||
|
||||
# TODO: Write QT_COORD_TYPE once we support setting it.
|
||||
string(APPEND content "QT_COORD_TYPE = ${QT_COORD_TYPE}\n")
|
||||
|
||||
qt_get_build_parts(build_parts)
|
||||
string(REPLACE ";" " " build_parts "${build_parts}")
|
||||
|
@ -534,6 +534,7 @@ translate_boolean_input(precompile_header BUILD_WITH_PCH)
|
||||
translate_boolean_input(ccache QT_USE_CCACHE)
|
||||
translate_boolean_input(shared BUILD_SHARED_LIBS)
|
||||
translate_string_input(qt_namespace QT_NAMESPACE)
|
||||
translate_string_input(qreal QT_COORD_TYPE)
|
||||
translate_path_input(prefix CMAKE_INSTALL_PREFIX)
|
||||
translate_path_input(extprefix CMAKE_STAGING_PREFIX)
|
||||
foreach(kind bin lib archdata libexec qml data doc translation sysconf examples tests)
|
||||
|
@ -56,7 +56,7 @@ The effort of this is tracked in QTBUG-85373 and QTBUG-85349.
|
||||
| -c++std c++2a | -DFEATURE_cxx2a=ON | |
|
||||
| -sse2/sse3/-ssse3/-sse4.1 | | |
|
||||
| -mips_dsp/-mips_dspr2 | | |
|
||||
| -qreal <type> | | |
|
||||
| -qreal <type> | -DQT_COORD_TYPE=<type> | |
|
||||
| -R <string> | -DQT_EXTRA_RPATHS=path1;path2 | |
|
||||
| -rpath | negative CMAKE_SKIP_BUILD_RPATH | |
|
||||
| | negative CMAKE_SKIP_INSTALL_RPATH | |
|
||||
|
@ -797,6 +797,12 @@ qt_feature("dbus-linked" PRIVATE
|
||||
ENABLE INPUT_dbus STREQUAL 'linked'
|
||||
DISABLE INPUT_dbus STREQUAL 'runtime'
|
||||
)
|
||||
qt_feature("qreal"
|
||||
LABEL "Type for qreal"
|
||||
CONDITION DEFINED QT_COORD_TYPE AND NOT QT_COORD_TYPE STREQUAL "double"
|
||||
)
|
||||
qt_feature_definition("qreal" "QT_COORD_TYPE" VALUE "${QT_COORD_TYPE}")
|
||||
qt_feature_definition("qreal" "QT_COORD_TYPE_STRING" VALUE "\"${QT_COORD_TYPE}\"")
|
||||
qt_feature("gui" PRIVATE
|
||||
LABEL "Qt Gui"
|
||||
)
|
||||
|
@ -886,6 +886,21 @@ def get_feature_mapping():
|
||||
"profile": None,
|
||||
"qmakeargs": None,
|
||||
"qpa_default_platform": None, # Not a bool!
|
||||
"qreal" : {
|
||||
"condition": "DEFINED QT_COORD_TYPE AND NOT QT_COORD_TYPE STREQUAL \"double\"",
|
||||
"output": [
|
||||
{
|
||||
"type": "define",
|
||||
"name": "QT_COORD_TYPE",
|
||||
"value": "${QT_COORD_TYPE}",
|
||||
},
|
||||
{
|
||||
"type": "define",
|
||||
"name": "QT_COORD_TYPE_STRING",
|
||||
"value": "\\\"${QT_COORD_TYPE}\\\"",
|
||||
},
|
||||
],
|
||||
},
|
||||
"release": None,
|
||||
"release_tools": None,
|
||||
"rpath": {
|
||||
|
Loading…
Reference in New Issue
Block a user