summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-04-11 08:50:43 -0700
committerKonstantin Käfer <mail@kkaefer.com>2014-04-11 08:50:43 -0700
commitee2f17d2b446f792827dd449dcafc3dd986a7ffa (patch)
tree498a7d1686e256c3b680244d59f32021d9ffa1f8
parentc45378a88c232a070995999c28b46febc2270bc9 (diff)
downloadqtlocation-mapboxgl-ee2f17d2b446f792827dd449dcafc3dd986a7ffa.tar.gz
fix build on travis
-rw-r--r--.travis.yml17
-rw-r--r--Makefile31
-rwxr-xr-xbin/build-shaders.js4
-rwxr-xr-xconfigure9
-rwxr-xr-xdeps/run_gyp4
-rw-r--r--llmr.gyp4
6 files changed, 31 insertions, 38 deletions
diff --git a/.travis.yml b/.travis.yml
index 50857eb68e..d1460572ee 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,21 +6,12 @@ compiler:
before_install:
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
+- sudo add-apt-repository --yes ppa:boost-latest/ppa
- sudo apt-get update -qq
- sudo apt-get -y install gcc-4.8 g++-4.8
-- sudo apt-get -y install git cmake make pkg-config libboost-dev libpng-dev
-- sudo apt-get -y install libxi-dev libglu1-mesa-dev x11proto-randr-dev x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev
-
-install:
-- export CURRENT_DIR=$(pwd)
-- 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 ${CURRENT_DIR}
+- sudo apt-get -y install pkg-config nodejs
+- sudo apt-get -y install libboost1.55-dev libpng-dev libcurl4-openssl-dev
+- sudo apt-get -y install libglu1-mesa-dev
before_script:
- export CXX="g++-4.8"
diff --git a/Makefile b/Makefile
index b42499dced..f98311b7f9 100644
--- a/Makefile
+++ b/Makefile
@@ -6,77 +6,70 @@ V ?= 1
all: llmr
-deps: glsl-optimizer
-
-llmr: deps config.gypi src llmr.gyp
+llmr: config.gypi src llmr.gyp
deps/run_gyp llmr.gyp -Goutput_dir=./out/ --depth=. --generator-output=./out -f make
make -j8 -C out BUILDTYPE=Release V=$(V) llmr-x86
-gtest: deps config.gypi src llmr.gyp
+gtest: config.gypi src llmr.gyp
deps/run_gyp llmr.gyp -Goutput_dir=./out/ --depth=. --generator-output=./build/gtest -f make
make -C build/gtest gtest V=$(V)
# build OS X app with pure make
-app: deps config.gypi src macosx/llmr-app.gyp
+app: config.gypi src macosx/llmr-app.gyp
deps/run_gyp macosx/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./build/macosx-make -f make
make -C build/macosx-make V=$(V)
open build/macosx-make/out/Release/llmr.app
-linux: deps config.gypi src linux/llmr-app.gyp
+linux: config.gypi src linux/llmr-app.gyp
deps/run_gyp linux/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./build/linux-make -f make
make -C build/linux-make V=$(V)
./build/linux-make/out/Release/llmr.app
# build OS X app with Xcode
-lproj: deps config.gypi src linux/llmr-app.gyp
+lproj: config.gypi src linux/llmr-app.gyp
deps/run_gyp linux/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode
open ./linux/llmr-app.xcodeproj
# build just xcode project for libllmr
-xcode: deps config.gypi llmr.gyp
+xcode: config.gypi llmr.gyp
deps/run_gyp llmr.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode
# build OS X app with Xcode
-xproj: deps config.gypi src macosx/llmr-app.gyp
+xproj: config.gypi src macosx/llmr-app.gyp
deps/run_gyp macosx/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode
open ./macosx/llmr-app.xcodeproj
# build OS X app with xcodebuild
-xapp: deps config.gypi src macosx/llmr-app.gyp
+xapp: config.gypi src macosx/llmr-app.gyp
deps/run_gyp macosx/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode
xcodebuild -project ./macosx/llmr-app.xcodeproj
open macosx/build/Release/llmr.app
# build iOS app with Xcode
-iproj: deps config.gypi src ios/llmr-app.gyp
+iproj: config.gypi src ios/llmr-app.gyp
deps/run_gyp ios/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode
open ./ios/llmr-app.xcodeproj
# build iOS app with xcodebuild
-iapp: deps config.gypi src ios/llmr-app.gyp
+iapp: config.gypi src ios/llmr-app.gyp
deps/run_gyp ios/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode
xcodebuild -project ./ios/llmr-app.xcodeproj
# launch app with ios-sim?
-isim: deps config.gypi src ios/llmr-app.gyp
+isim: config.gypi src ios/llmr-app.gyp
deps/run_gyp ios/llmr-app.gyp -Goutput_dir=./out/ --depth=. --generator-output=./ -f xcode
xcodebuild -project ./ios/llmr-app.xcodeproj -arch i386 -sdk iphonesimulator
# does not work
#"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator" -SimulateApplication ios/build/Release-iphonesimulator/llmr.app/llmr
-test: deps config.gypi src test/test.gyp
+test: config.gypi src test/test.gyp
deps/run_gyp test/test.gyp -Goutput_dir=. --depth=. --generator-output=./build/test -f make
make -C build/test V=$(V)
@for FILE in build/test/Release/test_*; do \
$${FILE}; \
done
-glsl-optimizer: bin/node_modules/glsl-optimizer/build/Release/glslOptimizer.node
-
-bin/node_modules/glsl-optimizer/build/Release/glslOptimizer.node:
- cd bin && npm install
-
clean:
-rm -rf out
-rm -rf build
diff --git a/bin/build-shaders.js b/bin/build-shaders.js
index 7e43a8f730..60d510907a 100755
--- a/bin/build-shaders.js
+++ b/bin/build-shaders.js
@@ -3,7 +3,8 @@
var fs = require('fs');
var path = require('path');
-var glsl = require('glsl-optimizer');
+
+try { var glsl = require('glsl-optimizer'); } catch(err) {}
module.exports = function(shader_type, root) {
var name;
@@ -11,7 +12,6 @@ module.exports = function(shader_type, root) {
var shaderFiles = fs.readdirSync('src/shader');
-
// Load shaders
for (var i = 0; i < shaderFiles.length; i++) {
var parts = shaderFiles[i].match(/^(.+)\.(vertex|fragment)\.glsl$/);
diff --git a/configure b/configure
index 7156568ba2..2fa0a149ae 100755
--- a/configure
+++ b/configure
@@ -17,6 +17,11 @@ parser.add_option("--debug",
dest="debug",
help="Also build debug build")
+parser.add_option("--node",
+ action="store",
+ dest="node",
+ help="Name of the node executable (defaults to node)")
+
parser.add_option("--pkg-config-root",
action="store",
dest="pkgconfig_root",
@@ -48,6 +53,10 @@ def configure_llmr(o):
o['variables']['boost_root'] = options.boost_root
else:
o['variables']['boost_root'] = '/usr/local'
+ if options.node:
+ o['variables']['node'] = options.node
+ else:
+ o['variables']['node'] = 'node'
o['target_defaults']['default_configuration'] = 'Debug' if options.debug else 'Release'
def configure_glfw3(o):
diff --git a/deps/run_gyp b/deps/run_gyp
index 6f14ef163a..f25d50a5dd 100755
--- a/deps/run_gyp
+++ b/deps/run_gyp
@@ -1,8 +1,8 @@
#!/usr/bin/env python
import sys
import os.path
-sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'gyp', 'pylib'))
+sys.path.insert(1, os.path.join(os.path.dirname(sys.argv[0]), 'gyp', 'pylib'))
import gyp
if __name__ == '__main__':
- sys.exit(gyp.script_main()) \ No newline at end of file
+ sys.exit(gyp.script_main())
diff --git a/llmr.gyp b/llmr.gyp
index 27623481f7..e96da9e07d 100644
--- a/llmr.gyp
+++ b/llmr.gyp
@@ -18,7 +18,7 @@
'src/shader/shaders_gl.cpp',
'src/shader/shaders_gles2.cpp',
],
- 'action': ['bin/build-shaders.js'],
+ 'action': ['<@(node)', 'bin/build-shaders.js'],
}
]
},
@@ -35,7 +35,7 @@
'include/llmr/style/resources.hpp',
'src/style/resources.cpp'
],
- 'action': ['bin/build-style.js']
+ 'action': ['<@(node)', 'bin/build-style.js']
}
],
},