summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-04-17 11:42:26 -0400
committerKonstantin Käfer <mail@kkaefer.com>2014-04-17 11:42:26 -0400
commit0cf5020b63b78354e7f55ec3dfac30de6925821d (patch)
tree63e61790f5ed6a8d26f209c387319aa17b62ac29 /README.md
parent157992c0448001db6ef10a5d2d20bf9d9a1a38f6 (diff)
downloadqtlocation-mapboxgl-0cf5020b63b78354e7f55ec3dfac30de6925821d.tar.gz
update readme
[skip ci]
Diffstat (limited to 'README.md')
-rw-r--r--README.md88
1 files changed, 25 insertions, 63 deletions
diff --git a/README.md b/README.md
index 8fdf2800a9..5492a51cb6 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,8 @@ implemented in C++11, targeting iOS & OS X.
- Modern C++ compiler that supports `-std=c++11`
- libpng
+ - libuv
+ - libcurl (depends on OpenSSL)
- glfw3
- Boost (for Rtree support)
- Python (for build only)
@@ -12,54 +14,28 @@ implemented in C++11, targeting iOS & OS X.
# Build instructions
-## OS X
-
-Install libpng and [glfw3](http://www.glfw.org/docs/latest/):
-
-```
-brew install libpng
-brew install homebrew/versions/glfw3
-brew install boost
-```
-
-Then configure the project:
-
- ./configure --glfw3=`brew --prefix` --png=`brew --prefix`
-
-See all the options by calling `./configure --help`
-
-```sh
-$ ./configure --help
-Usage: configure [options]
+We use [mapnik-packaging](https://github.com/mapnik/mapnik-packaging) to build static libraries of
+dependencies.
-Options:
- -h, --help show this help message and exit
- --debug Also build debug build
- --glfw3=GLFW3 Path to gflw3 (defaults to using pkg-config)
- --png=PNG Path to png (defaults to using pkg-config)
- --png-includes=PNG_INCLUDES
- Path to png includes
- --png-libpath=PNG_LIBPATH
- Path to png libs
-```
-
-Then you can build the OS X app with make:
+## OS X
- make app
+Run `./setup_libraries.sh`
-Or generate a dual iOS/OS X-compatible Xcode project for `libllmr` to include as a subproject:
+This downloads all required dependencies, builds them and creates universal libraries that can be
+used on both OS X and iOS.
- make xcode # then open llmr.xcodeproj
+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 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
## iOS
-Because `libpng` isn't included in the iOS SDK, you will need to build a cross-architecture version yourself. Run `./ios/setup_libpng.sh`, which is derived from Mapnik's cross-architecture build scripts. This will also run `./configure`.
-
-Then you can build the iOS app with make:
-
- make iapp
-
-Consider `sudo npm install -g ios-sim` for auto-launching the simulator, but it can be tricky and it's better to run on an ARM-based device anyway. To do this, open `./ios/llmr-app.xcodeproj` in Xcode, then build and run on the simulator or a device yourself.
+Because `libpng` isn't included in the iOS SDK, you will need to build a cross-architecture version
+yourself. Run `./setup_libraries.sh`, which is derived from Mapnik's cross-architecture build
+scripts. This will also run `./configure`.
Target devices: iPhone 4 and above (4S, 5, 5c, 5s) and iPad 2 and above (3, 4, mini and/or retina).
@@ -67,7 +43,8 @@ Target devices: iPhone 4 and above (4S, 5, 5c, 5s) and iPad 2 and above (3, 4, m
Ensure you have git and other build essentials:
- sudo apt-get install git cmake make pkg-config
+ sudo apt-get update
+ sudo apt-get install git cmake make pkg-config curl automake libtool xutils-dev
Install a `-std=c++11` capable compiler
@@ -75,32 +52,17 @@ Install a `-std=c++11` capable compiler
sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8
-Install libpng-dev:
-
- sudo apt-get install libpng-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
+ sudo apt-get install libxi-dev libglu1-mesa-dev x11proto-randr-dev x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev
-Install glfw3:
+Build static dependencies:
- git clone https://github.com/glfw/glfw.git
- cd glfw
- mkdir build
- cd build
- cmake ../ -DCMAKE_C_COMPILER_ENV_VAR=gcc-4.8
- make
- sudo make install
- cd ../../
+ ./setup_libraries.sh
-Build `libllmr`:
+This will automatically run configure for you and set the correct paths.
- git clone git@github.com:mapbox/llmr-native.git
- cd llmr-native
- export CXX="g++-4.8"
- ./configure
- make
+You can then proceed to build the library, tests or a GLFW app itself.
# Style
@@ -111,7 +73,7 @@ file and the associated header, run
bin/build-style.js
```
-This is automatically taken care of as a build phase if you are using the Xcode projects.
+This is automatically taken care of as a build phase.
# Usage