diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-10-24 15:43:05 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-10-24 16:40:08 +0200 |
commit | cd9a89257a0004ca18460befc4b141bc07ed5c22 (patch) | |
tree | e336a602b561854f043557096b83140aa04cd63a /gyp | |
parent | 10c765948471e6d13e2eb45b44ac6c4d108dafc5 (diff) | |
download | qtlocation-mapboxgl-cd9a89257a0004ca18460befc4b141bc07ed5c22.tar.gz |
restructure gyp files
Diffstat (limited to 'gyp')
-rw-r--r-- | gyp/certificates.gypi | 13 | ||||
-rw-r--r-- | gyp/fixtures.gypi | 18 | ||||
-rw-r--r-- | gyp/library.gypi | 75 | ||||
-rw-r--r-- | gyp/npm_install.gypi | 21 | ||||
-rw-r--r-- | gyp/platform-ios.gypi | 51 | ||||
-rw-r--r-- | gyp/platform-linux.gypi | 53 | ||||
-rw-r--r-- | gyp/platform-osx.gypi | 33 | ||||
-rw-r--r-- | gyp/shaders.gypi | 36 | ||||
-rw-r--r-- | gyp/styles.gypi | 36 |
9 files changed, 336 insertions, 0 deletions
diff --git a/gyp/certificates.gypi b/gyp/certificates.gypi new file mode 100644 index 0000000000..6a358f0dbf --- /dev/null +++ b/gyp/certificates.gypi @@ -0,0 +1,13 @@ +{ + 'targets': [ + { + 'target_name': 'copy_certificate_bundle', + 'type': 'none', + 'hard_dependency': 1, + 'copies': [{ + 'files': [ '../common/ca-bundle.crt' ], + 'destination': '<(PRODUCT_DIR)' + }], + }, + ] +} diff --git a/gyp/fixtures.gypi b/gyp/fixtures.gypi new file mode 100644 index 0000000000..f290da5d53 --- /dev/null +++ b/gyp/fixtures.gypi @@ -0,0 +1,18 @@ +{ + 'targets': [ + { + 'target_name': 'copy_fixtures', + 'type': 'none', + 'hard_dependency': 1, + 'dependencies': [ + 'bundle_styles' + ], + 'copies': [ + { + 'files': [ '../styles' ], + 'destination': '../test/fixtures/style_parser' + } + ] + }, + ] +} diff --git a/gyp/library.gypi b/gyp/library.gypi new file mode 100644 index 0000000000..bb86432dac --- /dev/null +++ b/gyp/library.gypi @@ -0,0 +1,75 @@ +{ + 'targets': [ + { + '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': { + '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)', + ] + }] + ] + } + } + ] +} diff --git a/gyp/npm_install.gypi b/gyp/npm_install.gypi new file mode 100644 index 0000000000..07d2e3e00e --- /dev/null +++ b/gyp/npm_install.gypi @@ -0,0 +1,21 @@ +{ + '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)'] + } + ], + }, + ] +} diff --git a/gyp/platform-ios.gypi b/gyp/platform-ios.gypi new file mode 100644 index 0000000000..d070744925 --- /dev/null +++ b/gyp/platform-ios.gypi @@ -0,0 +1,51 @@ +{ + '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', + } + }], + ], + }, + 'targets': [ + { + 'target_name': 'mapboxgl-ios', + 'product_name': 'mapboxgl-ios', + 'type': 'static_library', + '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)', + ], + }, + }, + }, + ], +} diff --git a/gyp/platform-linux.gypi b/gyp/platform-linux.gypi new file mode 100644 index 0000000000..4288def7fc --- /dev/null +++ b/gyp/platform-linux.gypi @@ -0,0 +1,53 @@ +{ + 'targets': [ + { + 'target_name': 'mapboxgl-linux', + 'product_name': 'mapboxgl-linux', + 'type': 'static_library', + '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)', + ] + }] + ] + } + }, + ] +} diff --git a/gyp/platform-osx.gypi b/gyp/platform-osx.gypi new file mode 100644 index 0000000000..adc0d3232c --- /dev/null +++ b/gyp/platform-osx.gypi @@ -0,0 +1,33 @@ +{ + 'targets': [ + { + 'target_name': 'mapboxgl-osx', + 'product_name': 'mapboxgl-osx', + 'type': 'static_library', + '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)', + ], + }, + }, + }, + ], +} diff --git a/gyp/shaders.gypi b/gyp/shaders.gypi new file mode 100644 index 0000000000..9435bd7d9c --- /dev/null +++ b/gyp/shaders.gypi @@ -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/', + ] + } + }, + ] +} diff --git a/gyp/styles.gypi b/gyp/styles.gypi new file mode 100644 index 0000000000..31bf530c5f --- /dev/null +++ b/gyp/styles.gypi @@ -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)' + }], + }, + ] +} |