summaryrefslogtreecommitdiff
path: root/mapboxgl.gyp
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2014-07-17 12:44:45 -0400
committerMike Morris <michael.patrick.morris@gmail.com>2014-07-17 12:44:45 -0400
commit4cb9972278c2121a87161e3b02b2071acc1ca8e1 (patch)
treeb0f017fda1740503c1bd7d5e3a28e586648d2e77 /mapboxgl.gyp
parent056f9e88d5214ae5752ec946666c756e2bf3d72b (diff)
parentfa4133a094a084527633038d2de1982ed4898a08 (diff)
downloadqtlocation-mapboxgl-4cb9972278c2121a87161e3b02b2071acc1ca8e1.tar.gz
Merge branch 'master' into fuzz-pipe
Conflicts: bin/package.json src/style/style_parser.cpp test/fixtures/fixture_log.cpp test/test.gyp
Diffstat (limited to 'mapboxgl.gyp')
-rw-r--r--mapboxgl.gyp258
1 files changed, 258 insertions, 0 deletions
diff --git a/mapboxgl.gyp b/mapboxgl.gyp
new file mode 100644
index 0000000000..9930cd3fbd
--- /dev/null
+++ b/mapboxgl.gyp
@@ -0,0 +1,258 @@
+{
+ 'includes': [
+ './common.gypi',
+ './config.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']
+ }
+ ],
+ },
+ {
+ 'target_name': 'build_stylesheet',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'npm_install'
+ ],
+ 'actions': [
+ {
+ 'action_name': 'Build Stylesheet',
+ 'inputs': [
+ 'bin/style.json',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/bin/style.min.js',
+ '<(SHARED_INTERMEDIATE_DIR)/bin/fuzz-colors.min.js',
+ '<(SHARED_INTERMEDIATE_DIR)/bin/fuzz-functions.min.js',
+ '<(SHARED_INTERMEDIATE_DIR)/bin/fuzz-layers.min.js',
+ ],
+ 'action': ['<@(node)', 'bin/build-style.js', '<@(_inputs)', '<(SHARED_INTERMEDIATE_DIR)/bin']
+ }
+ ],
+ 'direct_dependent_settings': {
+ 'sources': [
+ '<(SHARED_INTERMEDIATE_DIR)/bin/style.min.js',
+ '<(SHARED_INTERMEDIATE_DIR)/bin/fuzz-colors.min.js',
+ '<(SHARED_INTERMEDIATE_DIR)/bin/fuzz-functions.min.js',
+ '<(SHARED_INTERMEDIATE_DIR)/bin/fuzz-layers.min.js',
+ ],
+ }
+ },
+ {
+ 'target_name': 'copy_default_stylesheet',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'build_stylesheet'
+ ],
+ 'copies': [
+ {
+ 'files': [
+ '<(SHARED_INTERMEDIATE_DIR)/bin/style.min.js',
+ '<(SHARED_INTERMEDIATE_DIR)/bin/fuzz-colors.min.js',
+ '<(SHARED_INTERMEDIATE_DIR)/bin/fuzz-functions.min.js',
+ '<(SHARED_INTERMEDIATE_DIR)/bin/fuzz-layers.min.js',
+ ],
+ 'destination': '<(PRODUCT_DIR)'
+ }
+ ]
+ },
+ {
+ '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': [
+ 'build_stylesheet',
+ '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'
+ ],
+ 'xcode_settings': {
+ 'SDKROOT': 'macosx',
+ 'SUPPORTED_PLATFORMS':['macosx'],
+ 'MACOSX_DEPLOYMENT_TARGET':'10.9',
+ 'PUBLIC_HEADERS_FOLDER_PATH': 'include',
+ 'OTHER_CPLUSPLUSFLAGS':[
+ '<@(png_cflags)',
+ '<@(uv_cflags)',
+ '-I<(boost_root)/include',
+ ]
+ },
+ 'include_dirs':[
+ './include'
+ ],
+ 'cflags': [
+ '<@(png_cflags)',
+ '-I<(boost_root)/include',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs':[
+ './include',
+ ],
+ 'cflags': [
+ '<@(png_cflags)',
+ '<@(uv_cflags)',
+ ],
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS':[
+ '<@(png_cflags)',
+ '<@(uv_cflags)',
+ ]
+ },
+ 'conditions': [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '<@(png_libraries)',
+ '<@(uv_libraries)',
+ ]
+ }
+ }, {
+ 'libraries': [
+ '<@(png_libraries)',
+ '<@(uv_libraries)',
+ ]
+ }]
+ ]
+ }
+ },
+ {
+ 'target_name': 'mapboxgl-ios',
+ 'product_name': 'mapboxgl-ios',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'build_stylesheet',
+ '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)',
+ '-I<(boost_root)/include',
+ ]
+ },
+ 'include_dirs':[
+ './include'
+ ],
+ 'cflags': [
+ '<@(png_cflags)',
+ '<@(uv_cflags)',
+ '-I<(boost_root)/include',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs':[
+ './include'
+ ],
+ 'cflags': [
+ '<@(png_cflags)',
+ '<@(uv_cflags)',
+ ],
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS':[
+ '<@(png_cflags)',
+ '<@(uv_cflags)',
+ ]
+ },
+ 'conditions': [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '<@(png_libraries)',
+ '<@(uv_libraries)',
+ ]
+ }
+ }, {
+ 'libraries': [
+ '<@(png_libraries)',
+ '<@(uv_libraries)'
+ ]
+ }]
+ ]
+ }
+ }
+ ]
+}