summaryrefslogtreecommitdiff
path: root/platform/linux/platform.gyp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-04-03 15:16:49 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-04-07 18:01:02 -0700
commitf964e40e7e9220d08751d8607af61ac5a7c0794c (patch)
treed34ca5407188fe3d71396faa8a8acceb52d9bd4b /platform/linux/platform.gyp
parentf5d66f362272db034a311d2077dbdb2937c9bbdf (diff)
downloadqtlocation-mapboxgl-f964e40e7e9220d08751d8607af61ac5a7c0794c.tar.gz
[build] Refactor and simplify build system
* Main gyp files are now standardized as platform/<platform>/platform.gyp. * Each platform gyp file defines appropriate loop_lib and headless_lib variables. * Each platform gyp file includes mbgl.gypi, which defines base targets which may be useful to all platforms. * CI targets are consistent across platforms: `make $(PLATFORM) && make test-$(PLATFORM)`. * Renamed the "linux" test app to "glfw". It's now built in OS X CI. * Android build flakiness is fixed. * iOS CI builds the bench and iosapp targets. * Mesa version is now in one place. * CI scripts use bash "strict mode" and correct error handling. * All build output goes to the build directory. * Removed vestigial iOS/OS X/Android Travis scripts.
Diffstat (limited to 'platform/linux/platform.gyp')
-rw-r--r--platform/linux/platform.gyp97
1 files changed, 97 insertions, 0 deletions
diff --git a/platform/linux/platform.gyp b/platform/linux/platform.gyp
new file mode 100644
index 0000000000..0adbd2a2e6
--- /dev/null
+++ b/platform/linux/platform.gyp
@@ -0,0 +1,97 @@
+{
+ 'variables': {
+ 'loop_lib': 'uv',
+ 'headless_lib': 'glx',
+ },
+ 'conditions': [
+ ['OS == "mac"', {
+ 'variables': {
+ 'headless_lib': 'cgl',
+ }
+ }],
+ ],
+ 'includes': [
+ '../../mbgl.gypi',
+ '../../test/test.gypi',
+ '../../bin/glfw.gypi',
+ '../../bin/render.gypi',
+ '../../bin/offline.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'platform-lib',
+ 'product_name': 'mbgl-platform-linux',
+ 'type': 'static_library',
+ 'standalone_static_library': 1,
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'core',
+ ],
+
+ 'include_dirs': [
+ '../default',
+ '../../include',
+ '../../src', # TODO: eliminate
+ ],
+
+ 'sources': [
+ '../default/log_stderr.cpp',
+ '../default/string_stdlib.cpp',
+ '../default/thread.cpp',
+ '../default/image.cpp',
+ '../default/webp_reader.cpp',
+ '../default/png_reader.cpp',
+ '../default/jpeg_reader.cpp',
+ '../default/asset_file_source.cpp',
+ '../default/http_request_curl.cpp',
+ '../default/default_file_source.cpp',
+ '../default/online_file_source.cpp',
+ '../default/mbgl/storage/offline.hpp',
+ '../default/mbgl/storage/offline.cpp',
+ '../default/mbgl/storage/offline_database.hpp',
+ '../default/mbgl/storage/offline_database.cpp',
+ '../default/mbgl/storage/offline_download.hpp',
+ '../default/mbgl/storage/offline_download.cpp',
+ '../default/sqlite3.hpp',
+ '../default/sqlite3.cpp',
+ ],
+
+ 'cflags_cc': [
+ '<@(boost_cflags)',
+ '<@(nunicode_cflags)',
+ '<@(sqlite_cflags)',
+ '<@(rapidjson_cflags)',
+ '<@(variant_cflags)',
+ '<@(libcurl_cflags)',
+ '<@(libpng_cflags)',
+ '<@(libjpeg-turbo_cflags)',
+ '<@(webp_cflags)',
+ ],
+
+ 'link_settings': {
+ 'libraries': [
+ '<@(nunicode_ldflags)',
+ '<@(nunicode_static_libs)',
+ '<@(sqlite_ldflags)',
+ '<@(sqlite_static_libs)',
+ '<@(zlib_ldflags)',
+ '<@(zlib_static_libs)',
+ '<@(libcurl_ldflags)',
+ '<@(libcurl_static_libs)',
+ '<@(libpng_ldflags)',
+ '<@(libpng_static_libs)',
+ '<@(libjpeg-turbo_ldflags)',
+ '<@(libjpeg-turbo_static_libs)',
+ '<@(webp_ldflags)',
+ '<@(webp_static_libs)',
+ ],
+ },
+
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../include',
+ ],
+ },
+ },
+ ],
+}