use more modern libpng version instead of the system-provided one and fix compile errors

This commit is contained in:
Konstantin Käfer
2014-10-30 12:40:16 -07:00
parent 3d6a87ab1b
commit 592ed57d09
6 changed files with 14 additions and 5 deletions

2
configure vendored
View File

@@ -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

View File

@@ -12,6 +12,10 @@
'sources': [
'gtest-all.cc'
],
'link_settings': {
'xcode_settings': { 'OTHER_LDFLAGS': [ '-pthread' ] },
'ldflags': [ '-pthread' ],
},
'direct_dependent_settings': {
'include_dirs': [
'.',

View File

@@ -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)' ],
}]

View File

@@ -38,7 +38,7 @@
'OTHER_LDFLAGS': [ '<@(ldflags)' ],
}
}, {
'ldflags': [ '<@(ldflags)' ],
'libraries': [ '<@(ldflags)' ],
}]
],
'dependencies': [

View File

@@ -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;
}
}

View File

@@ -8,7 +8,7 @@
'<@(uv_ldflags)',
'<@(sqlite3_ldflags)',
'<@(curl_ldflags)',
'<@(png_ldflags)'
'<@(png_ldflags)',
],
},
'targets': [