Merge branch 'master' into mesa

Conflicts:
	.travis.yml
This commit is contained in:
Mike Morris
2014-10-27 12:15:45 -04:00
51 changed files with 730 additions and 595 deletions

View File

@@ -19,10 +19,9 @@ matrix:
env:
global:
- secure: "HPlPuLk531F7bCyADMcxQ+I1CfGhJlhX9A3q3auNCdLsjqaZbktaCIGuq4R1IPZz0UTtO8RfrTfVaoktyZdq2QyU3iD8oj6BeZ/Jypr4TCBJxI5IeyU3gyPMFHqUYIJuHL9k40Xu7Dhf4HT123zr8KoeVqCHauZP1/TumA0nezg="
- secure: "R/+uOeccl7GqjJbknailAV7VtjAtGwHHM9xToVnhfPVUXp9fzJs+oNk3IWcs3Eg4sw4WsYxXRfbCQG9bA3MnPlTOsxETGRioO9CAuXap6mwcwNAzeWuq7ePFki2u01pJGQD5b6WFqBCdnAQ4o2SgHgGzhs0TJzYd9tONQxSmkCI="
- secure: "bG4YYWMfl9API0MSRgmOaJrlGLv06tRg9KJNawBieZvBJbITPpxVGJZT3/l/SEJ+Rl15e2dRex4k+MGQlmT2SqPQxTEYWv1qxNigKPPcla7IWeNmWWqW8uVvFjdglojgBOK2k/xErVQtA4zDfi3mwSXH4DKwquXWsoEKmX2SV7M="
- secure: "Cbvap9ubVKgjPe3hUhI6JGeDZzBXHpOG9RaYKh+SdoIPhKnlJiNOYm1egomi+e4uqJInlFKuVHTw7Ng9Cun6Zm0jIxpkSchv1GpsR7hmB3UGnGed19Dw8121FwuUaktN+4YnbVlsyd+u8EHD3+h58t4eELrLrZolM4rS7DL6caA="
- secure: "RiBIBfVhhaMjU5ksuwJO3shdvG9FpinBjdSv4co9jg9171SR8edNriedHjVKSIeBhSGNmZmX+twS3dJS/By6tl/LKh9sTynA+ZAYYljkE7jn881B/gMrlYvdAA6og5KvkhV1/0iJWlhuZrMTkhpDR200iLgg3EWBhWjltzmDW/I="
- AWS_S3_BUCKET: 'node-mapbox-gl-native'
- LD_LIBRARY_PATH: '/usr/local/lib'
before_install:

View File

@@ -1,24 +1,35 @@
BUILDTYPE ?= Release
PYTHON ?= python
V ?= 1
PREFIX ?= /usr/local
ifeq ($(shell uname -s), Darwin)
PLATFORM ?= osx
endif
PLATFORM ?= linux
all: mbgl
config.gypi:
config.gypi: configure
./configure
config-ios.gypi:
config-ios.gypi: configure
MASON_PLATFORM=ios ./configure config-ios.gypi
# Builds the regular library
mbgl: config.gypi mapboxgl.gyp
deps/run_gyp mapboxgl.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build/mbgl -f make
$(MAKE) -C build/mbgl BUILDTYPE=$(BUILDTYPE) V=$(V) mapboxgl
deps/run_gyp mapboxgl.gyp -Iconfig.gypi -Dplatform=$(PLATFORM) --depth=. -Goutput_dir=.. --generator-output=./build/mbgl -f make
$(MAKE) -C build/mbgl BUILDTYPE=$(BUILDTYPE) V=$(V) mbgl
install: config.gypi mapboxgl.gyp
deps/run_gyp mapboxgl.gyp -Iconfig.gypi -Dplatform=$(PLATFORM) -Dinstall_prefix=$(PREFIX) --depth=. -Goutput_dir=.. --generator-output=./build/mbgl -f make
$(MAKE) -C build/mbgl BUILDTYPE=$(BUILDTYPE) V=$(V) install
##### Test cases ###############################################################
build/test/Makefile: src common config.gypi test/test.gyp
deps/run_gyp test/test.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build/test -f make
deps/run_gyp test/test.gyp -Iconfig.gypi -Dplatform=$(PLATFORM) --depth=. -Goutput_dir=.. --generator-output=./build/test -f make
test: build/test/Makefile
$(MAKE) -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) test
@@ -29,7 +40,7 @@ test_%: build/test/Makefile
# build Mac OS X project for Xcode
xtest: config.gypi clear_xcode_cache
deps/run_gyp test/test.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build -f xcode
deps/run_gyp test/test.gyp -Iconfig.gypi -Dplatform=osx --depth=. -Goutput_dir=.. --generator-output=./build -f xcode
open ./build/test/test.xcodeproj
##### Makefile builds ##########################################################
@@ -37,7 +48,7 @@ xtest: config.gypi clear_xcode_cache
# Builds the linux app with make.
linux: config.gypi linux/mapboxgl-app.gyp
deps/run_gyp linux/mapboxgl-app.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build/linux -f make
deps/run_gyp linux/mapboxgl-app.gyp -Iconfig.gypi -Dplatform=linux --depth=. -Goutput_dir=.. --generator-output=./build/linux -f make
$(MAKE) -C build/linux BUILDTYPE=$(BUILDTYPE) V=$(V) linuxapp
# Executes the Linux binary
@@ -48,7 +59,7 @@ run-linux: linux
# Builds the OS X app with make.
osx: config.gypi macosx/mapboxgl-app.gyp
deps/run_gyp macosx/mapboxgl-app.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build/macosx -f make
deps/run_gyp macosx/mapboxgl-app.gyp -Iconfig.gypi -Dplatform=osx --depth=. -Goutput_dir=.. --generator-output=./build/macosx -f make
$(MAKE) -C build/macosx BUILDTYPE=$(BUILDTYPE) V=$(V) osxapp
# Executes the OS X binary
@@ -70,21 +81,21 @@ clear_xcode_cache:
# build Mac OS X project for Xcode
xproj-cli: config.gypi macosx/mapboxgl-app.gyp clear_xcode_cache
deps/run_gyp macosx/mapboxgl-app.gyp -Iconfig.gypi --depth=. --generator-output=./build -f xcode
deps/run_gyp macosx/mapboxgl-app.gyp -Iconfig.gypi -Dplatform=osx --depth=. --generator-output=./build -f xcode
xproj: xproj-cli
open ./build/macosx/mapboxgl-app.xcodeproj
# build iOS project for Xcode
iproj-cli: config-ios.gypi ios/mapbox-gl-cocoa/app/mapboxgl-app.gyp clear_xcode_cache
deps/run_gyp ios/mapbox-gl-cocoa/app/mapboxgl-app.gyp -Iconfig-ios.gypi --depth=. --generator-output=./build -f xcode
deps/run_gyp ios/mapbox-gl-cocoa/app/mapboxgl-app.gyp -Iconfig-ios.gypi -Dplatform=ios --depth=. --generator-output=./build -f xcode
iproj: iproj-cli
open ./build/ios/mapbox-gl-cocoa/app/mapboxgl-app.xcodeproj
# build Linux project for Xcode (Runs on Mac OS X too, but without platform-specific code)
lproj: config.gypi linux/mapboxgl-app.gyp clear_xcode_cache
deps/run_gyp linux/mapboxgl-app.gyp -Iconfig.gypi --depth=. --generator-output=./build -f xcode
deps/run_gyp linux/mapboxgl-app.gyp -Iconfig.gypi -Dplatform=linux --depth=. --generator-output=./build -f xcode
open ./build/linux/mapboxgl-app.xcodeproj
@@ -98,5 +109,5 @@ clean: clear_xcode_cache
distclean: clean
-rm -rf ./mason_packages
.PHONY: mbgl test linux build/test/Makefile clean distclean
.PHONY: mbgl install test linux clear_xcode_cache build/test/Makefile clean distclean
# DO NOT DELETE

189
README.md
View File

@@ -6,114 +6,129 @@ implemented in C++11, currently targeting iOS, OS X, and Ubuntu Linux.
# Depends
- Modern C++ compiler that supports `-std=c++11` (On OS X clang++, on Linux g++-4.8 or g++-4.9)
- Boost headers
- `libpng`
- `libuv`
- `glfw3`
- `libcurl` (depends on OpenSSL; Linux only)
- [Boost headers](http://boost.org/)
- [`zlib`](http://www.zlib.net/)
- [`libpng`](http://www.libpng.org/pub/png/libpng.html)
- [`libuv 0.10+`](https://github.com/joyent/libuv)
- [`glfw 3.1+`](http://www.glfw.org/)
- [`libcurl`](http://curl.haxx.se/libcurl/) (depends on OpenSSL; Linux only)
- `libboost_regex` (Linux only)
- Apple Command Line Tools (for build on OS X; available at [Apple Developer](https://developer.apple.com/downloads))
- `pkg-config` (for build only)
- [Homebrew](http://brew.sh) (for build on OS X)
- Python 2.x (for build only)
- Node.js (for build only)
# Build instructions
We use [mapnik-packaging](https://github.com/mapnik/mapnik-packaging) to build static libraries of
dependencies.
We try to link to as many system-provided libraries as possible. When these are unavailable or too outdated, we run a thin build-script layer called [Mason](https://github.com/mapbox/mason) to automate builds, and load precompiled binary packages when possible.
First off: if you hit problems during development try:
## OS X
make clean
On OS X, we are using `zlib`, `SQLite3`, `libcurl` and `libpng` provided by the operating system. In addition to that, you need to have the Boost headers installed. To install all prerequisites, use [Homebrew](http://brew.sh/) and type `brew install pkg-config boost`.
This will clear cached build data and update to the latest versions of dependencies.
To create projects, you can run:
### Mapbox API access tokens
- `make xproj`: Creates an Xcode project with OS X-specific handlers for HTTP downloads and settings storage. It uses [GLFW](http://www.glfw.org) for window handling.
- `make lproj`: Creates an Xcode project with platform-independent handlers for downloads and settings storage. This is what is also being built on Linux.
- `make osx run-osx`: Builds and runs the OS X application on the command line with `xcodebuild`.
- `make linux run-linux`: Builds and runs the Linux application with `make`.
The demo applications use Mapbox vector tiles, which **require a Mapbox account and API access token**. Obtain an access token on the [Mapbox account page](https://www.mapbox.com/account/apps/).
Note that you can't have more than one project in Xcode open at a time since they the static library project is shared across the OS X, Linux and iOS project.
For iOS and OS X use of the demo apps in Xcode, setup the access token by editing the scheme for the application target, then adding an environment variable with the name `MAPBOX_ACCESS_TOKEN`.
Target OS: 10.9+
## iOS
iOS makes use of a Cocoa-specific API called [`mapbox-gl-cocoa`](https://github.com/mapbox/mapbox-gl-cocoa). If you are just interested in running Mapbox GL on iOS and not developing with it, head to that project and you can use this library as a pre-built static library instead. A `UIView` interface to the map view and bundle resources are provided there.
If you intend to develop here, `mapbox-gl-cocoa` is included as a submodule of the overall build setup.
To pull down the submodule(s), run:
git submodule init
git submodule update
Then, you can run `make iproj` to create and open an Xcode project with an iOS-specific view controller housing. This will automatically install required dependencies as well.
Note that if you are doing OS X development as well, to toggle from OS X back to iOS, you will need to `make iproj` again.
Target devices: iPhone 4S and above (5, 5c, 5s, 6, 6 Plus) and iPad 2 and above (3, 4, Mini , Air, Mini 2, Air 2).
Target OS: 7.0+
## Linux
We are using Ubuntu for development. While the software should work on other distributions as well, we are not providing explicit build instructions here.
Install GCC 4.8+ if you are running Ubuntu 13.10 or older. Alternatively, you can also use Clang 3.4+.
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8
Ensure you have git and other build essentials:
sudo apt-get install git build-essential zlib1g-dev automake \
libtool xutils-dev make cmake pkg-config python-pip \
libcurl4-openssl-dev libpng-dev libsqlite3-dev
Install glfw3 dependencies:
sudo apt-get install libxi-dev libglu1-mesa-dev x11proto-randr-dev \
x11proto-xext-dev libxrandr-dev \
x11proto-xf86vidmode-dev libxxf86vm-dev \
libxcursor-dev libxinerama-dev
Finally, install Boost. If you're running Ubuntu 12.04 or older, you need to install a backport PPA since the version provided by APT doesn't contain Boost Geometry:
sudo add-apt-repository --yes ppa:boost-latest/ppa
sudo apt-get update
sudo apt-get install libboost1.55-dev libboost-regex1.55-dev
Otherwise, you can just install
sudo apt-get install libboost-dev libboost-regex-dev
Once you're done installing the build dependencies, you can get started by running
./configure
which downloads all other dependencies that we need to build manually with [Mason](https://github.com/mapbox/mason). There's a good chance that there already are binary files and that you don't need to compile anything.
Then, you can then proceed to build the library like:
make mbgl
Or proceed to building the debug application with:
make linux
# Troubleshooting
To trigger a complete rebuild, run `make clean` and then start over generating the Xcode projects or Makefiles as described above.
If you are having trouble getting the dependencies right, you can blow away the `mason_packages` directory, or run `make distclean`. This means the Makefile and configure script will automatically install the dependencies again on the next try.
On OS X, you can also try clearing the Xcode cache with `make clear_xcode_cache`.
# Mapbox API access tokens
The demo applications use Mapbox vector tiles, which **require a Mapbox account and API access token**. Obtain an access token on the [Mapbox account page](https://www.mapbox.com/account/apps/).
For iOS and OS X use of the demo apps in Xcode, setup the access token by editing the scheme for the application target, then adding an environment variable with the name `MAPBOX_ACCESS_TOKEN`.
![edit scheme](https://cloud.githubusercontent.com/assets/98601/3647749/30f74f26-1102-11e4-84af-f1be853b4e38.png)
![setting access token in Xcode scheme](https://cloud.githubusercontent.com/assets/52399/3543326/9e7cfbb8-0860-11e4-8def-3684a9028b61.png)
## OS X
Run:
make setup
This downloads all required dependencies, builds them and creates universal libraries that can be used on both OS X and iOS.
To create projects, you can run:
- `make xproj`: Creates an Xcode project with OS X-specific handlers for HTTP downloads and
settings storage. It uses [GLFW](http://www.glfw.org) for window handling.
- `make lproj`: Creates an Xcode project with platform-independent handlers for downloads
and settings storage. This is what is also being built on Linux.
- `make linux`: Builds the Linux GLFW application with `make`.
Note that if you are doing iOS development as well, to toggle from iOS back to OS X, you will need to `make xproj` again.
Target OS: 10.9+
## iOS
iOS makes use of a Cocoa-specific API called [`mapbox-gl-cocoa`](https://github.com/mapbox/mapbox-gl-cocoa). If you are just interested in running Mapbox GL on iOS and not developing with it, head to that project and you can use this library as a pre-built static library instead. A `UIView` interface to the map view and bundle resources are provided there.
If you intend to develop here, `mapbox-gl-cocoa` is included as a submodule of the overall build setup.
First, pull down the submodule(s):
git submodule init
git submodule update
Then run:
make setup
This downloads all required dependencies, builds them and creates universal libraries that can be used on both OS X and iOS.
Lastly, `make iproj` to create and open an Xcode project with an iOS-specific view controller housing.
Note that if you are doing OS X development as well, to toggle from OS X back to iOS, you will need to `make iproj` again.
Target devices: iPhone 4 and above (4S, 5, 5c, 5s) and iPad 2 and above (3, 4, mini and/or retina).
Target OS: 7.0+
## Ubuntu
Set the environment variable `MAPBOX_ACCESS_TOKEN` to your token.
Ensure you have git and other build essentials:
sudo apt-get update
sudo apt-get install git build-essential zlib1g-dev automake libtool xutils-dev make cmake pkg-config nodejs-legacy curl libuv-dev
If you are running Ubuntu 13.10 or older, install a `-std=c++11` capable compiler:
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8
Install glfw3 dependencies:
sudo apt-get install libxi-dev libglu1-mesa-dev x11proto-randr-dev x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev
Then run:
make setup
This downloads all required dependencies, builds them and creates universal libraries that can be used on both OS X and iOS.
You can then proceed to build the library like:
make linux
For Linux, set the environment variable `MAPBOX_ACCESS_TOKEN` to your token.
# Style
Some styles in JSON format are included at `./styles`. See the [style spec](https://github.com/mapbox/mapbox-gl-style-spec) for more details.
Some styles in JSON format are included at `./styles`. See the [style spec](https://github.com/mapbox/mapbox-gl-style-spec) for more details.
# Usage
@@ -136,4 +151,4 @@ Some styles in JSON format are included at `./styles`. See the [style spec](http
# Other notes
Under early development, this project was called LLMR (Low-Level Map Renderer), in case you see any lingering references to it.
Under early development, this project was called LLMR (Low-Level Map Renderer), in case you see any lingering references to it.

8
configure vendored
View File

@@ -2,6 +2,7 @@
set -e
set -o pipefail
shopt -s expand_aliases
CONFIG_FILE=${1:-config.gypi}
@@ -26,6 +27,13 @@ else
>&2 echo -en "\033[0m";
fi
# Install mason
if [[ ! -d ~/.mason ]]; then
>&2 echo -e "\033[1m\033[32m* Installing Mason\033[0m"
git clone https://github.com/mapbox/mason.git ~/.mason
fi
alias mason='~/.mason/mason'
case $MASON_PLATFORM in
'ios')

12
gyp/certificates.gypi Normal file
View File

@@ -0,0 +1,12 @@
{
'targets': [
{ 'target_name': 'copy_certificate_bundle',
'type': 'none',
'hard_dependency': 1,
'copies': [{
'files': [ '../common/ca-bundle.crt' ],
'destination': '<(PRODUCT_DIR)'
}],
},
]
}

View File

@@ -1,4 +1,7 @@
{
'variables': {
'install_prefix%': '',
},
'target_defaults': {
'default_configuration': 'Release',
'conditions': [
@@ -44,6 +47,6 @@
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO'
}
},
}
},
}
}

17
gyp/fixtures.gypi Normal file
View File

@@ -0,0 +1,17 @@
{
'targets': [
{ 'target_name': 'copy_fixtures',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
'bundle_styles'
],
'copies': [
{
'files': [ '../styles' ],
'destination': '../test/fixtures/style_parser'
}
]
},
]
}

23
gyp/install.gypi Normal file
View File

@@ -0,0 +1,23 @@
{
'conditions': [
['install_prefix != ""', {
'targets': [
{ 'target_name': 'install',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
'mbgl',
'mbgl-headless',
'mbgl-<(platform)',
],
'copies': [
{ 'files': [ '<(PRODUCT_DIR)/libmbgl.a' ], 'destination': '<(install_prefix)/lib' },
{ 'files': [ '<(PRODUCT_DIR)/libmbgl-headless.a' ], 'destination': '<(install_prefix)/lib' },
{ 'files': [ '<(PRODUCT_DIR)/libmbgl-<(platform).a' ], 'destination': '<(install_prefix)/lib' },
{ 'files': [ '../include/mbgl' ], 'destination': '<(install_prefix)/include' }
],
},
]
}],
],
}

15
gyp/mbgl-headless.gypi Normal file
View File

@@ -0,0 +1,15 @@
{
'targets': [
{ 'target_name': 'mbgl-headless',
'product_name': 'mbgl-headless',
'type': 'static_library',
'include_dirs': [
'../include',
],
'sources': [
'../platform/default/headless_view.cpp',
'../platform/default/headless_display.cpp',
],
},
]
}

58
gyp/mbgl-ios.gypi Normal file
View File

@@ -0,0 +1,58 @@
{
'target_defaults': {
'target_conditions': [
['_type == "static_library"', {
'xcode_settings': {
'SDKROOT': 'iphoneos',
'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++11',
'IPHONEOS_DEPLOYMENT_TARGET':'7.0',
'TARGETED_DEVICE_FAMILY': '1,2',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'CLANG_ENABLE_OBJC_ARC': 'YES',
'CODE_SIGN_IDENTITY': 'iPhone Developer',
'PUBLIC_HEADERS_FOLDER_PATH': 'include',
},
'configurations': {
'Release': {
'xcode_settings': {
'ARCHS': [ "armv7", "armv7s", "arm64", "i386", "x86_64" ],
},
},
},
}],
],
},
'targets': [
{ 'target_name': 'mbgl-ios',
'product_name': 'mbgl-ios',
'type': 'static_library',
'hard_dependency': 1,
'include_dirs': [
'../include',
],
'sources': [
'../platform/ios/cache_database_library.mm',
'../platform/darwin/log_nslog.mm',
'../platform/darwin/string_nsstring.mm',
'../platform/darwin/http_request_baton_cocoa.mm',
],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'<@(uv_cflags)',
],
},
'direct_dependent_settings': {
'include_dirs': [
'../include',
],
'xcode_settings': {
'OTHER_LDFLAGS': [
'<@(uv_libraries)',
],
},
},
},
],
}

54
gyp/mbgl-linux.gypi Normal file
View File

@@ -0,0 +1,54 @@
{
'targets': [
{ 'target_name': 'mbgl-linux',
'product_name': 'mbgl-linux',
'type': 'static_library',
'hard_dependency': 1,
'include_dirs': [
'../include'
],
'sources': [
'../platform/default/cache_database_tmp.cpp',
'../platform/default/log_stderr.cpp',
'../platform/default/string_stdlib.cpp',
'../platform/default/http_request_baton_curl.cpp',
],
'conditions': [
['OS == "mac"', {
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'<@(uv_cflags)',
'<@(curl_cflags)',
],
}
}, {
'cflags': [
'<@(uv_cflags)',
'<@(curl_cflags)',
],
}]
],
'direct_dependent_settings': {
'include_dirs': [
'../include',
],
'conditions': [
['OS == "mac"', {
'xcode_settings': {
'OTHER_LDFLAGS': [
'<@(uv_libraries)',
'<@(curl_libraries)',
]
}
}, {
'libraries': [
'<@(uv_libraries)',
'<@(curl_libraries)',
'-lboost_regex',
]
}]
]
}
},
]
}

33
gyp/mbgl-osx.gypi Normal file
View File

@@ -0,0 +1,33 @@
{
'targets': [
{ 'target_name': 'mbgl-osx',
'product_name': 'mbgl-osx',
'type': 'static_library',
'hard_dependency': 1,
'include_dirs': [
'../include',
],
'sources': [
'../platform/osx/cache_database_application_support.mm',
'../platform/darwin/log_nslog.mm',
'../platform/darwin/string_nsstring.mm',
'../platform/darwin/http_request_baton_cocoa.mm',
],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'<@(uv_cflags)',
],
},
'direct_dependent_settings': {
'include_dirs': [
'../include',
],
'xcode_settings': {
'OTHER_LDFLAGS': [
'<@(uv_libraries)',
],
},
},
},
],
}

16
gyp/mbgl-platform.gypi Normal file
View File

@@ -0,0 +1,16 @@
{
'conditions': [
['platform == "osx"', {
'includes': ['mbgl-osx.gypi'],
'variables': { 'platform_library': 'mbgl-osx' },
}],
['platform == "ios"', {
'includes': ['mbgl-ios.gypi'],
'variables': { 'platform_library': 'mbgl-ios' },
}],
['platform == "linux"', {
'includes': ['mbgl-linux.gypi'],
'variables': { 'platform_library': 'mbgl-linux' },
}],
],
}

74
gyp/mbgl.gypi Normal file
View File

@@ -0,0 +1,74 @@
{
'targets': [
{ 'target_name': 'mbgl',
'product_name': 'mbgl',
'type': 'static_library',
'hard_dependency': 1,
'dependencies': [
'shaders',
],
'sources': [
'<!@(find src -name "*.cpp")',
'<!@(test -f "config/constants_local.cpp" && echo "config/constants_local.cpp" || echo "config/constants.cpp")',
'<!@(find src -name "*.c")',
'<!@(find src -name "*.h")',
'<!@(find include -name "*.hpp")',
'<!@(find include -name "*.h")',
'<!@(find src -name "*.glsl")',
'bin/style.json'
],
'include_dirs': [
'../include'
],
'conditions': [
['OS == "mac"', {
'xcode_settings': {
'PUBLIC_HEADERS_FOLDER_PATH': 'include',
'OTHER_CPLUSPLUSFLAGS': [
'<@(png_cflags)',
'<@(uv_cflags)',
'<@(sqlite3_cflags)',
'<@(zlib_cflags)',
'-I<(boost_root)/include',
],
'OTHER_CFLAGS': [
'<@(uv_cflags)',
],
},
}, {
'cflags': [
'<@(png_cflags)',
'<@(uv_cflags)',
'<@(sqlite3_cflags)',
'<@(zlib_cflags)',
'-I<(boost_root)/include',
],
}]
],
'direct_dependent_settings': {
'include_dirs': [
'../include',
],
'conditions': [
['OS == "mac"', {
'xcode_settings': {
'OTHER_LDFLAGS': [
'<@(png_libraries)',
'<@(uv_libraries)',
'<@(sqlite3_libraries)',
'<@(zlib_libraries)',
]
}
}, {
'libraries': [
'<@(png_libraries)',
'<@(uv_libraries)',
'<@(sqlite3_libraries)',
'<@(zlib_libraries)',
]
}]
]
}
}
]
}

20
gyp/npm_install.gypi Normal file
View File

@@ -0,0 +1,20 @@
{
'targets': [
{ 'target_name': 'npm_install',
'type': 'none',
'hard_dependency': 1,
'actions': [
{
'action_name': 'npm install',
'inputs': [
'../bin/package.json',
],
'outputs': [
'../bin/node_modules',
],
'action': ['./scripts/npm_install.sh', '<@(npm)']
}
],
},
]
}

36
gyp/shaders.gypi Normal file
View File

@@ -0,0 +1,36 @@
{
'targets': [
{
'target_name': 'shaders',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
'npm_install'
],
'actions': [
{
'action_name': 'Build Shaders',
'inputs': [
'<!@(find src -name "*.glsl")'
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp',
'<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp',
],
'action': ['<@(node)', 'bin/build-shaders.js', '<(SHARED_INTERMEDIATE_DIR)'],
}
],
'direct_dependent_settings': {
'sources': [
'<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp',
'<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp'
],
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/include/',
]
}
},
]
}

36
gyp/styles.gypi Normal file
View File

@@ -0,0 +1,36 @@
{
'targets': [
{
'target_name': 'touch_styles',
'type': 'none',
'hard_dependency': 1,
'actions': [
{
'action_name': 'Touch Stylesheet Directory',
'inputs': ['../styles'],
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/'], # need to specify a distinct directory
'action': ['touch', '../styles'],
}
],
},
{
'target_name': 'bundle_styles',
'type': 'none',
'hard_dependency': 1,
'dependencies': [ 'touch_styles' ], # required for xcode http://openradar.appspot.com/7232149
'direct_dependent_settings': {
'mac_bundle_resources': [ '../styles' ],
}
},
{
'target_name': 'copy_styles',
'type': 'none',
'hard_dependency': 1,
'dependencies': [ 'touch_styles' ], # required for xcode http://openradar.appspot.com/7232149
'copies': [{
'files': [ '../styles' ],
'destination': '<(PRODUCT_DIR)'
}],
},
]
}

View File

@@ -1,15 +1,16 @@
#include <mbgl/mbgl.hpp>
#include <mbgl/platform/platform.hpp>
#include <mbgl/util/uv.hpp>
#include <mbgl/platform/platform.hpp>
#include <mbgl/platform/default/settings_json.hpp>
#include <mbgl/platform/default/glfw_view.hpp>
#include <mbgl/platform/default/log_stderr.hpp>
#include <signal.h>
#include <getopt.h>
#include <fstream>
#include <sstream>
#include "../common/settings_json.hpp"
#include "../common/glfw_view.hpp"
#include "../common/stderr_log.hpp"
GLFWView *view = nullptr;

View File

@@ -1,7 +1,6 @@
{
'includes': [
'../common.gypi',
'../config.gypi',
'../gyp/common.gypi',
],
'targets': [
{
@@ -10,15 +9,9 @@
'type': 'executable',
'sources': [
'./main.cpp',
'../common/settings_json.cpp',
'../common/settings_json.hpp',
'../common/platform_default.cpp',
'../common/glfw_view.hpp',
'../common/glfw_view.cpp',
'../common/http_request_baton_curl.cpp',
'../common/linux.cpp',
'../common/stderr_log.hpp',
'../common/stderr_log.cpp',
'../platform/default/settings_json.cpp',
'../platform/default/glfw_view.cpp',
'../platform/default/log_stderr.cpp',
],
'conditions': [
@@ -29,11 +22,9 @@
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS':[
'<@(glfw3_cflags)',
'<@(curl_cflags)',
],
'OTHER_LDFLAGS': [
'<@(glfw3_libraries)',
'<@(curl_libraries)',
],
}
},
@@ -42,19 +33,19 @@
{
'cflags': [
'<@(glfw3_cflags)',
'<@(curl_cflags)',
],
'link_settings': {
'libraries': [
'<@(glfw3_libraries)',
'<@(curl_libraries)',
'-lboost_regex'
'-L<(boost_root)/lib',
'-lboost_regex',
],
},
}],
],
'dependencies': [
'../mapboxgl.gyp:mapboxgl',
'../mapboxgl.gyp:mbgl',
'../mapboxgl.gyp:mbgl-linux',
'../mapboxgl.gyp:copy_styles',
'../mapboxgl.gyp:copy_certificate_bundle',
],

View File

@@ -1,12 +1,10 @@
#include "../common/settings_nsuserdefaults.hpp"
#include "../common/glfw_view.hpp"
#include "../common/nslog_log.hpp"
#include "../common/Reachability.h"
#include <mbgl/platform/darwin/settings_nsuserdefaults.hpp>
#include <mbgl/platform/darwin/log_nslog.hpp>
#include <mbgl/platform/darwin/Reachability.h>
#include <mbgl/platform/default/glfw_view.hpp>
#import <Foundation/Foundation.h>
#include <uv.h>
@interface URLHandler : NSObject
@property (nonatomic) mbgl::Map *map;
@@ -71,7 +69,6 @@
@end
int main() {
fprintf(stderr, "main thread: 0x%lx\n", uv_thread_self());
mbgl::Log::Set<mbgl::NSLogBackend>();
GLFWView view;

View File

@@ -1,7 +1,6 @@
{
'includes': [
'../common.gypi',
'../config.gypi'
'../gyp/common.gypi',
],
'targets': [
{
@@ -10,17 +9,11 @@
'type': 'executable',
'sources': [
'./main.mm',
'../common/settings_nsuserdefaults.hpp',
'../common/settings_nsuserdefaults.mm',
'../common/platform_nsstring.mm',
'../common/glfw_view.hpp',
'../common/glfw_view.cpp',
'../common/reachability.h',
'../common/reachability.m',
'../common/http_request_baton_cocoa.mm',
'../common/osx.mm',
'../common/nslog_log.hpp',
'../common/nslog_log.mm',
'../platform/darwin/settings_nsuserdefaults.hpp',
'../platform/darwin/settings_nsuserdefaults.mm',
'../platform/darwin/reachability.m',
'../platform/default/glfw_view.hpp',
'../platform/default/glfw_view.cpp',
],
'product_extension': 'app',
'mac_bundle': 1,
@@ -44,7 +37,8 @@
},
'dependencies': [
'../mapboxgl.gyp:bundle_styles',
'../mapboxgl.gyp:mapboxgl',
'../mapboxgl.gyp:mbgl',
'../mapboxgl.gyp:mbgl-osx',
]
}
]

View File

@@ -1,248 +1,14 @@
{
'includes': [
'./common.gypi',
'./gyp/common.gypi',
'./gyp/shaders.gypi',
'./gyp/npm_install.gypi',
'./gyp/styles.gypi',
'./gyp/fixtures.gypi',
'./gyp/certificates.gypi',
'./gyp/mbgl.gypi',
'./gyp/mbgl-platform.gypi',
'./gyp/mbgl-headless.gypi',
'./gyp/install.gypi',
],
'targets': [
{
'target_name': 'shaders',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
'npm_install'
],
'actions': [
{
'action_name': 'Build Shaders',
'inputs': [
'<!@(find src -name "*.glsl")'
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp',
'<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp',
],
'action': ['<@(node)', 'bin/build-shaders.js', '<(SHARED_INTERMEDIATE_DIR)'],
}
],
'direct_dependent_settings': {
'sources': [
'<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp',
'<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp'
],
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/include/',
]
}
},
{
'target_name': 'npm_install',
'type': 'none',
'hard_dependency': 1,
'actions': [
{
'action_name': 'npm install',
'inputs': [
'bin/package.json',
],
'outputs': [
'bin/node_modules',
],
'action': ['./scripts/npm_install.sh', '<@(npm)']
}
],
},
{
'target_name': 'touch_styles',
'type': 'none',
'hard_dependency': 1,
'actions': [
{
'action_name': 'Touch Stylesheet Directory',
'inputs': ['styles'],
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/'], # need to specify a distinct directory
'action': ['touch', 'styles'],
}
],
},
{
'target_name': 'bundle_styles',
'type': 'none',
'hard_dependency': 1,
'dependencies': [ 'touch_styles' ], # required for xcode http://openradar.appspot.com/7232149
'direct_dependent_settings': {
'mac_bundle_resources': [ 'styles' ],
}
},
{
'target_name': 'copy_styles',
'type': 'none',
'hard_dependency': 1,
'dependencies': [ 'touch_styles' ], # required for xcode http://openradar.appspot.com/7232149
'copies': [{
'files': [ 'styles' ],
'destination': '<(PRODUCT_DIR)'
}],
},
{
'target_name': 'copy_fixtures',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
'bundle_styles'
],
'copies': [
{
'files': [ 'styles' ],
'destination': 'test/fixtures/style_parser'
}
]
},
{
'target_name': 'copy_certificate_bundle',
'type': 'none',
'hard_dependency': 1,
'copies': [{
'files': [ 'common/ca-bundle.crt' ],
'destination': '<(PRODUCT_DIR)'
}],
},
{
'target_name': 'mapboxgl',
'product_name': 'mapboxgl',
'type': 'static_library',
'hard_dependency': 1,
'dependencies': [
'shaders',
],
'sources': [
'<!@(find src -name "*.cpp")',
'<!@(test -f "config/constants_local.cpp" && echo "config/constants_local.cpp" || echo "config/constants.cpp")',
'<!@(find src -name "*.c")',
'<!@(find src -name "*.h")',
'<!@(find include -name "*.hpp")',
'<!@(find include -name "*.h")',
'<!@(find src -name "*.glsl")',
'bin/style.json'
],
'include_dirs': [
'./include'
],
'conditions': [
['OS == "mac"', {
'xcode_settings': {
'SDKROOT': 'macosx',
'SUPPORTED_PLATFORMS': ['macosx'],
'MACOSX_DEPLOYMENT_TARGET': '10.9',
'PUBLIC_HEADERS_FOLDER_PATH': 'include',
'OTHER_CPLUSPLUSFLAGS': [
'<@(png_cflags)',
'<@(uv_cflags)',
'<@(sqlite3_cflags)',
'<@(zlib_cflags)',
'-I<(boost_root)/include',
],
'OTHER_CFLAGS': [
'<@(uv_cflags)',
],
},
}, {
'cflags': [
'<@(png_cflags)',
'<@(uv_cflags)',
'<@(sqlite3_cflags)',
'<@(zlib_cflags)',
'-I<(boost_root)/include',
],
}]
],
'direct_dependent_settings': {
'include_dirs': [
'./include',
],
'conditions': [
['OS == "mac"', {
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'<@(uv_cflags)',
],
'OTHER_LDFLAGS': [
'<@(png_libraries)',
'<@(uv_libraries)',
'<@(sqlite3_libraries)',
'<@(zlib_libraries)',
]
}
}, {
'cflags': [
'<@(uv_cflags)',
],
'libraries': [
'<@(png_libraries)',
'<@(uv_libraries)',
'<@(sqlite3_libraries)',
'<@(zlib_libraries)',
]
}]
]
}
},
{
'target_name': 'mapboxgl-ios',
'product_name': 'mapboxgl-ios',
'type': 'static_library',
'hard_dependency': 1,
'dependencies': [
'shaders',
],
'sources': [
'<!@(find src/ \( -name "*.cpp" ! -name shaders.hpp ! -name shaders_gles2.cpp ! -name shaders_gl.cpp \))',
'<!@(test -f "config/constants_local.cpp" && echo "config/constants_local.cpp" || echo "config/constants.cpp")',
'<!@(find src -name "*.c")',
'<!@(find src -name "*.h")',
'<!@(find include -name "*.hpp")',
'<!@(find include -name "*.h")',
'<!@(find src -name "*.glsl")',
'bin/style.json'
],
'xcode_settings': {
'SDKROOT': 'iphoneos',
'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
'TARGETED_DEVICE_FAMILY': '1,2',
'CODE_SIGN_IDENTITY': 'iPhone Developer',
'IPHONEOS_DEPLOYMENT_TARGET': '7.0',
'PUBLIC_HEADERS_FOLDER_PATH': 'include',
'GCC_INPUT_FILETYPE': 'sourcecode.cpp.cpp',
'OTHER_CPLUSPLUSFLAGS': [
'<@(png_cflags)',
'<@(uv_cflags)',
'<@(sqlite3_cflags)',
'<@(zlib_cflags)',
'-I<(boost_root)/include',
],
},
'include_dirs': [
'./include'
],
'direct_dependent_settings': {
'include_dirs': [
'./include',
],
'xcode_settings': {
'OTHER_LDFLAGS': [
'<@(png_libraries)',
'<@(uv_libraries)',
'<@(sqlite3_libraries)',
'<@(zlib_libraries)',
],
'OTHER_CPLUSPLUSFLAGS': [
'<@(uv_cflags)',
],
'OTHER_CFLAGS': [
'<@(uv_cflags)',
],
}
}
}
]
}

View File

@@ -1,4 +1,4 @@
#include "nslog_log.hpp"
#include <mbgl/platform/darwin/log_nslog.hpp>
#import <Foundation/Foundation.h>

View File

@@ -25,7 +25,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
#import "Reachability.h"
#import <mbgl/platform/darwin/reachability.h>
NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotification";

View File

@@ -1,6 +1,6 @@
#import <Foundation/Foundation.h>
#include "settings_nsuserdefaults.hpp"
#include <mbgl/platform/darwin/settings_nsuserdefaults.hpp>
using namespace mbgl;

View File

@@ -18,4 +18,4 @@ std::string lowercase(const std::string &string) {
}
}
}
}

View File

@@ -1,4 +1,4 @@
#include "glfw_view.hpp"
#include <mbgl/platform/default/glfw_view.hpp>
#include <mbgl/util/string.hpp>

View File

@@ -1,4 +1,4 @@
#include "headless_display.hpp"
#include <mbgl/platform/default/headless_display.hpp>
#include <cstring>
#include <stdexcept>

View File

@@ -1,5 +1,5 @@
#include "headless_view.hpp"
#include "headless_display.hpp"
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/platform/default/headless_display.hpp>
#include <stdexcept>
#include <sstream>

View File

@@ -1,4 +1,4 @@
#include "stderr_log.hpp"
#include <mbgl/platform/default/log_stderr.hpp>
#include <iostream>
#include <cstdarg>

View File

@@ -1,4 +1,4 @@
#include "settings_json.hpp"
#include <mbgl/platform/default/settings_json.hpp>
#include <rapidjson/prettywriter.h>
#include <rapidjson/filestream.h>
#include <rapidjson/document.h>

View File

@@ -10,7 +10,10 @@ for TEST in ./test_* ; do
ulimit -c unlimited -S
echo 'ulimit -c: '`ulimit -c`
echo '/proc/sys/kernel/core_pattern: '`cat /proc/sys/kernel/core_pattern`
sysctl kernel.core_pattern
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
sysctl kernel.core_pattern
fi
RESULT=0
${TEST} || RESULT=$?

View File

@@ -9,8 +9,8 @@
#include <rapidjson/writer.h>
#include <rapidjson/stringbuffer.h>
#include "../common/headless_view.hpp"
#include "../common/headless_display.hpp"
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/platform/default/headless_display.hpp>
#include "./fixtures/fixture_log.hpp"

View File

@@ -1,201 +1,154 @@
{
'includes': [
'../common.gypi',
'../config.gypi'
'../gyp/common.gypi',
'../gyp/mbgl-platform.gypi',
],
'targets': [
{
'target_name': 'link_gl',
'type': 'none',
'direct_dependent_settings': {
'conditions': [
['OS == "mac"', {
'xcode_settings': {
'OTHER_LDFLAGS': [
'<@(glfw3_libraries)', # This is a hack since we're not actually using GLFW
],
},
}, {
'link_settings': {
'libraries': [
'<@(glfw3_libraries)', # This is a hack since we're not actually using GLFW
'-lboost_regex',
],
},
}],
],
},
{ 'target_name': 'rotation_range',
'product_name': 'test_rotation_range',
'type': 'executable',
'sources': [
'./main.cpp',
'./rotation_range.cpp',
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
'../mapboxgl.gyp:mbgl',
]
},
{
'target_name': 'link_curl',
'type': 'none',
'direct_dependent_settings': {
'conditions': [
['OS == "mac"', {
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS':[
'<@(curl_cflags)',
],
'OTHER_LDFLAGS': [
'<@(curl_libraries)',
],
},
}, {
'cflags': [
'<@(curl_cflags)',
],
'link_settings': {
'libraries': [
'<@(curl_libraries)',
],
},
}],
],
},
{ 'target_name': 'clip_ids',
'product_name': 'test_clip_ids',
'type': 'executable',
'sources': [
'./main.cpp',
'./clip_ids.cpp',
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
'../mapboxgl.gyp:mbgl',
]
},
{
"target_name": "rotation_range",
"product_name": "test_rotation_range",
"type": "executable",
"sources": [
"./main.cpp",
"./rotation_range.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../mapboxgl.gyp:mapboxgl",
{ 'target_name': 'enums',
'product_name': 'test_enums',
'type': 'executable',
'sources': [
'./main.cpp',
'./enums.cpp',
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
'../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'style_parser',
'product_name': 'test_style_parser',
'type': 'executable',
'sources': [
'./main.cpp',
'./style_parser.cpp',
'./fixtures/fixture_log.hpp',
'./fixtures/fixture_log.cpp',
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
'../mapboxgl.gyp:mbgl',
'../mapboxgl.gyp:copy_fixtures',
]
},
{ 'target_name': 'variant',
'product_name': 'test_variant',
'type': 'executable',
'sources': [
'./main.cpp',
'./variant.cpp',
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
'../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'comparisons',
'product_name': 'test_comparisons',
'type': 'executable',
'sources': [
'./main.cpp',
'./comparisons.cpp',
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
'../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'tile',
'product_name': 'test_tile',
'type': 'executable',
'sources': [
'./main.cpp',
'./tile.cpp',
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
'../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'functions',
'product_name': 'test_functions',
'type': 'executable',
'sources': [
'./main.cpp',
'./functions.cpp',
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
'../mapboxgl.gyp:mbgl',
]
},
{
"target_name": "clip_ids",
"product_name": "test_clip_ids",
"type": "executable",
"sources": [
"./main.cpp",
"./clip_ids.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../mapboxgl.gyp:mapboxgl",
]
{ 'target_name': 'headless',
'product_name': 'test_headless',
'type': 'executable',
'sources': [
'./main.cpp',
'./headless.cpp',
'./fixtures/fixture_request.cpp',
'./fixtures/fixture_log.cpp',
'../platform/default/headless_view.cpp',
'../platform/default/headless_display.cpp',
],
'conditions': [
# add libuv include path and OpenGL libs
['OS == "mac"',
{
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': ['<@(uv_cflags)'],
'OTHER_LDFLAGS': ['<@(glfw3_libraries)'],
},
},
{
'cflags': ['<@(uv_cflags)'],
'libraries': ['<@(glfw3_libraries)'],
}],
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
'../mapboxgl.gyp:mbgl',
'<(platform_library)',
],
},
{
"target_name": "enums",
"product_name": "test_enums",
"type": "executable",
"sources": [
"./main.cpp",
"./enums.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../mapboxgl.gyp:mapboxgl",
]
},
{
"target_name": "style_parser",
"product_name": "test_style_parser",
"type": "executable",
"sources": [
"./main.cpp",
"./style_parser.cpp",
"./fixtures/fixture_log.hpp",
"./fixtures/fixture_log.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../mapboxgl.gyp:mapboxgl",
"../mapboxgl.gyp:copy_fixtures",
]
},
{
"target_name": "variant",
"product_name": "test_variant",
"type": "executable",
"sources": [
"./main.cpp",
"./variant.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../mapboxgl.gyp:mapboxgl",
]
},
{
"target_name": "comparisons",
"product_name": "test_comparisons",
"type": "executable",
"sources": [
"./main.cpp",
"./comparisons.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../mapboxgl.gyp:mapboxgl",
]
},
{
"target_name": "tile",
"product_name": "test_tile",
"type": "executable",
"sources": [
"./main.cpp",
"./tile.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../mapboxgl.gyp:mapboxgl",
]
},
{
"target_name": "functions",
"product_name": "test_functions",
"type": "executable",
"sources": [
"./main.cpp",
"./functions.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../mapboxgl.gyp:mapboxgl",
]
},
{
"target_name": "headless",
"product_name": "test_headless",
"type": "executable",
"sources": [
"./main.cpp",
"./headless.cpp",
"../common/headless_view.hpp",
"../common/headless_view.cpp",
"../common/headless_display.hpp",
"../common/headless_display.cpp",
"../common/platform_default.cpp",
"./fixtures/fixture_request.cpp",
"./fixtures/fixture_log.hpp",
"./fixtures/fixture_log.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../mapboxgl.gyp:mapboxgl",
"link_gl",
]
},
{
"target_name": "test",
"type": "none",
"dependencies": [
"rotation_range",
"clip_ids",
"enums",
"variant",
"tile",
"functions",
"headless",
"style_parser",
"comparisons",
],
# Build all targets
{ 'target_name': 'test',
'type': 'none',
'dependencies': [
'rotation_range',
'clip_ids',
'enums',
'variant',
'tile',
'functions',
'headless',
'style_parser',
'comparisons',
],
}
]
}

View File

@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "node-mapbox-gl-native travis resources",
"Description": "mapbox-gl-native travis resources",
"Resources": {
"BuildUser": {
"Type": "AWS::IAM::User",
@@ -17,7 +17,7 @@
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::node-mapbox-gl-native"
"arn:aws:s3:::mapbox-gl-testing"
]
}
]
@@ -37,7 +37,7 @@
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::node-mapbox-gl-native/*"
"arn:aws:s3:::mapbox-gl-testing/*"
]
}
]