summaryrefslogtreecommitdiff
path: root/src/3rdparty
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2012-06-19 09:14:31 +0300
committerQt by Nokia <qt-info@nokia.com>2012-06-20 01:24:38 +0200
commitdf679c7d7c8f61f653bd4dfdd22231a3811ceeb3 (patch)
treed89b457e64c7d2a757c123442f0712873ea534b2 /src/3rdparty
parentaac07e7c3d5de028a823d40817f51ae8b4462d34 (diff)
downloadqtlocation-df679c7d7c8f61f653bd4dfdd22231a3811ceeb3.tar.gz
Fix qtlocation build for WEC7.
Apparently math.h in WEC7 does not define M_PI used by qtlocation. Added the requiresd define the necessary files. qSqrt returns qreal and it is defined to 'float' on some configurations and to 'double' in other configurations. In those configirations where it is defined to float, no suitable overload for division is found. Added explicit cast for qSqrt return value to double to fix the build. Change-Id: I734fab66abfd4ce95e02ec83e373f0eacd87bdef Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/poly2tri/common/utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/3rdparty/poly2tri/common/utils.h b/src/3rdparty/poly2tri/common/utils.h
index 9f50cc5d..0c72d7f5 100644
--- a/src/3rdparty/poly2tri/common/utils.h
+++ b/src/3rdparty/poly2tri/common/utils.h
@@ -38,6 +38,10 @@
#include <exception>
#include <math.h>
+#ifndef M_PI
+#define M_PI (3.14159265358979323846)
+#endif
+
namespace p2t {
const float PI_3div4 = 3 * M_PI / 4;