Merge branch 'master' of https://github.com/mapbox/llmr-native
This commit is contained in:
2
Makefile
2
Makefile
@@ -7,7 +7,7 @@ V ?= 1
|
||||
all: llmr
|
||||
|
||||
llmr: config.gypi src llmr.gyp
|
||||
$(MAKE) -C out BUILDTYPE=Release V=$(V) llmr-x86
|
||||
@if [ ! -f out ]; then echo 'please run ./configure first'; else $(MAKE) -C out BUILDTYPE=Release V=$(V) llmr-x86; fi;
|
||||
|
||||
# build OS X app with pure make
|
||||
app: config.gypi src macosx/llmr-app.gyp
|
||||
|
||||
16
README.md
16
README.md
@@ -1,5 +1,14 @@
|
||||
An OpenGL renderer for [Mapbox vector tiles](https://www.mapbox.com/blog/vector-tiles),
|
||||
implemented in C++, targeting iOS & OS X.
|
||||
implemented in C++11, targeting iOS & OS X.
|
||||
|
||||
# Depends
|
||||
|
||||
- Modern C++ compiler that supports `-std=c++11`
|
||||
- libpng
|
||||
- glfw3
|
||||
- Boost (headers only)
|
||||
- Python (for build only)
|
||||
- Node.js (for build only)
|
||||
|
||||
# Build instructions
|
||||
|
||||
@@ -34,7 +43,6 @@ Options:
|
||||
Path to png libs
|
||||
```
|
||||
|
||||
|
||||
Then you can build the OS X app with make:
|
||||
|
||||
make app
|
||||
@@ -102,12 +110,10 @@ Build `libllmr`:
|
||||
./configure
|
||||
make
|
||||
|
||||
Note: build will not compile until https://github.com/mapbox/llmr-native/issues/26 is fixed.
|
||||
|
||||
# Style protobuf
|
||||
|
||||
We're encoding the styling information as a protocol buffer, according to
|
||||
proto/style.proto. The reason for doing so is that we don't have to ship with a
|
||||
proto/style.proto. The reason for doing so is to avoid needing to ship with a
|
||||
JSON/yaml parser. To test the conversion script, run
|
||||
|
||||
```
|
||||
|
||||
68
llmr.gyp
68
llmr.gyp
@@ -5,18 +5,8 @@
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'llmr-x86',
|
||||
'product_name': 'llmr-x86',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'<!@(find src -name "*.cpp")',
|
||||
'<!@(find src -name "*.c")',
|
||||
'<!@(find src -name "*.h")',
|
||||
'<!@(find include -name "*.hpp")',
|
||||
'<!@(find include -name "*.h")',
|
||||
'<!@(find src -name "*.glsl")',
|
||||
'bin/style.js'
|
||||
],
|
||||
'target_name': 'before_build_actions',
|
||||
'type':'none',
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'Build Shaders',
|
||||
@@ -51,6 +41,23 @@
|
||||
'action': ['bin/build-style.js']
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'llmr-x86',
|
||||
'product_name': 'llmr-x86',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'before_build_actions'
|
||||
],
|
||||
'sources': [
|
||||
'<!@(find src -name "*.cpp")',
|
||||
'<!@(find src -name "*.c")',
|
||||
'<!@(find src -name "*.h")',
|
||||
'<!@(find include -name "*.hpp")',
|
||||
'<!@(find include -name "*.h")',
|
||||
'<!@(find src -name "*.glsl")',
|
||||
'bin/style.js'
|
||||
],
|
||||
'xcode_settings': {
|
||||
'SDKROOT': 'macosx',
|
||||
'SUPPORTED_PLATFORMS':['macosx'],
|
||||
@@ -97,6 +104,9 @@
|
||||
'target_name': 'llmr-ios',
|
||||
'product_name': 'llmr-ios',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'before_build_actions'
|
||||
],
|
||||
'sources': [
|
||||
'<!@(find src -name "*.cpp")',
|
||||
'<!@(find src -name "*.c")',
|
||||
@@ -106,40 +116,6 @@
|
||||
'<!@(find src -name "*.glsl")',
|
||||
'bin/style.js'
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'Build Shaders',
|
||||
'inputs': [
|
||||
'<!@(find src -name "*.glsl")'
|
||||
],
|
||||
'outputs': [
|
||||
'include/llmr/shader/shaders.hpp',
|
||||
'src/shader/shaders.cpp'
|
||||
],
|
||||
'action': ['bin/build-shaders.js'],
|
||||
},
|
||||
{
|
||||
'action_name': 'Convert Style to Protobuf',
|
||||
'inputs': [
|
||||
'bin/style.js'
|
||||
],
|
||||
'outputs': [
|
||||
'resources/style.pbf'
|
||||
],
|
||||
'action': ['bin/convert-style.js'],
|
||||
},
|
||||
{
|
||||
'action_name': 'Update Style Resources',
|
||||
'inputs': [
|
||||
'resources/style.pbf'
|
||||
],
|
||||
'outputs': [
|
||||
'include/llmr/style/resources.hpp',
|
||||
'src/style/resources.cpp'
|
||||
],
|
||||
'action': ['bin/build-style.js']
|
||||
}
|
||||
],
|
||||
'xcode_settings': {
|
||||
'SDKROOT': 'iphoneos',
|
||||
'SUPPORTED_PLATFORMS':['iphonesimulator','iphoneos',],
|
||||
|
||||
Reference in New Issue
Block a user