qt: add QT_COORD_TYPE to double option
authorJulien D'Ascenzio <jdascenzio@paratronic.fr>
Wed, 22 Apr 2015 08:34:18 +0000 (10:34 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Apr 2015 10:15:30 +0000 (12:15 +0200)
On ARM-based platforms, qreal is a typedef for float for performance
reasons. But we may want a double precision anyway.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/qt/Config.in
package/qt/qt.mk

index 43f5a0fc7c0d4b5f5eadb2578870e177085ffc87..83fdeec812bbd3d717ea7726fb4b92d1ed38f9d4 100644 (file)
@@ -120,6 +120,16 @@ config BR2_PACKAGE_QT_CONFIG_FILE
          This option allows to set the path of such a configuration
          file, which Buildroot will give to Qt at compile time.
 
+config BR2_PACKAGE_QT_QT_COORD_TYPE_DOUBLE
+       bool "QT_COORD_TYPE to double"
+       help
+         Set QT_COORD_TYPE to double. On ARM-based platforms, qreal
+         is a typedef for float for performance reasons, but for
+         QT_COORD_TYPE, some people may want to use a double type
+         anyway for precision.
+
+         If unsure say n.
+
 config BR2_PACKAGE_QT_QT3SUPPORT
        bool "Compatibility with Qt3"
        depends on BR2_PACKAGE_QT_GUI_MODULE
index d1615ae0bfebb8f9b3bd5c3dacfe11caa5e3b112..919137b2a259db452abeb38dedea8b8ecfa26c94 100644 (file)
@@ -46,6 +46,11 @@ QT_CFLAGS += -marm
 QT_CXXFLAGS += -marm
 endif
 
+ifeq ($(BR2_PACKAGE_QT_QT_COORD_TYPE_DOUBLE),y)
+QT_CFLAGS += -DQT_COORD_TYPE=double
+QT_CXXFLAGS += -DQT_COORD_TYPE=double
+endif
+
 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT),y)
 QT_CONFIGURE_OPTS += -qt3support
 else