summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-30 12:40:16 -0700
committerKonstantin Käfer <mail@kkaefer.com>2014-10-30 12:40:16 -0700
commit592ed57d09f8f0913dae195e6e867884d11a2327 (patch)
tree6dd3a1d4a027a40e525484de68a34c6754f291b3
parent3d6a87ab1b43e4f4712e5456ccf91bdcbc15bb7e (diff)
downloadqtlocation-mapboxgl-592ed57d09f8f0913dae195e6e867884d11a2327.tar.gz
use more modern libpng version instead of the system-provided one and fix compile errors
-rwxr-xr-xconfigure2
-rw-r--r--deps/gtest/gtest.gyp4
-rw-r--r--gyp/mbgl-linux.gypi6
-rw-r--r--linux/mapboxgl-app.gyp2
-rw-r--r--platform/default/image.cpp3
-rw-r--r--test/test.gyp2
6 files changed, 14 insertions, 5 deletions
diff --git a/configure b/configure
index 2bcfbdf62e..cc96f038b0 100755
--- a/configure
+++ b/configure
@@ -48,7 +48,7 @@ case ${MASON_PLATFORM} in
*)
GLFW_VERSION=a21f2377
SQLITE_VERSION=system
- LIBPNG_VERSION=system
+ LIBPNG_VERSION=1.6.13
LIBCURL_VERSION=system
LIBUV_VERSION=0.10.28
ZLIB_VERSION=system
diff --git a/deps/gtest/gtest.gyp b/deps/gtest/gtest.gyp
index c62b6be3f8..56d01bf988 100644
--- a/deps/gtest/gtest.gyp
+++ b/deps/gtest/gtest.gyp
@@ -12,6 +12,10 @@
'sources': [
'gtest-all.cc'
],
+ 'link_settings': {
+ 'xcode_settings': { 'OTHER_LDFLAGS': [ '-pthread' ] },
+ 'ldflags': [ '-pthread' ],
+ },
'direct_dependent_settings': {
'include_dirs': [
'.',
diff --git a/gyp/mbgl-linux.gypi b/gyp/mbgl-linux.gypi
index 2b166ea434..ca3e2afc54 100644
--- a/gyp/mbgl-linux.gypi
+++ b/gyp/mbgl-linux.gypi
@@ -30,6 +30,11 @@
'include_dirs': [
'../include',
],
+ 'link_settings': {
+ 'libraries': [
+ '<@(png_static_libs)',
+ ],
+ },
'conditions': [
['OS == "mac"', {
'xcode_settings': {
@@ -37,7 +42,6 @@
'OTHER_CFLAGS': [ '<@(cflags)' ],
}
}, {
- 'ldflags': [ '<@(ldflags)' ],
'cflags_cc': [ '<@(cflags_cc)' ],
'cflags': [ '<@(cflags)' ],
}]
diff --git a/linux/mapboxgl-app.gyp b/linux/mapboxgl-app.gyp
index 03a0c0aed7..57bd1171b2 100644
--- a/linux/mapboxgl-app.gyp
+++ b/linux/mapboxgl-app.gyp
@@ -38,7 +38,7 @@
'OTHER_LDFLAGS': [ '<@(ldflags)' ],
}
}, {
- 'ldflags': [ '<@(ldflags)' ],
+ 'libraries': [ '<@(ldflags)' ],
}]
],
'dependencies': [
diff --git a/platform/default/image.cpp b/platform/default/image.cpp
index 5b1afec7aa..68d1786913 100644
--- a/platform/default/image.cpp
+++ b/platform/default/image.cpp
@@ -5,6 +5,7 @@
#include <cassert>
#include <cstdlib>
#include <stdexcept>
+#include <cstring>
namespace mbgl {
@@ -73,7 +74,7 @@ void readCallback(png_structp png, png_bytep data, png_size_t length) {
if (reader->pos + length > reader->length) {
png_error(png, "Read Error");
} else {
- memcpy(data, reader->data + reader->pos, length);
+ std::memcpy(data, reader->data + reader->pos, length);
reader->pos += length;
}
}
diff --git a/test/test.gyp b/test/test.gyp
index 74f4139a96..9e56f4f2c0 100644
--- a/test/test.gyp
+++ b/test/test.gyp
@@ -8,7 +8,7 @@
'<@(uv_ldflags)',
'<@(sqlite3_ldflags)',
'<@(curl_ldflags)',
- '<@(png_ldflags)'
+ '<@(png_ldflags)',
],
},
'targets': [