summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDane Springmeyer <dane@mapbox.com>2014-10-29 16:17:52 -0400
committerDane Springmeyer <dane@mapbox.com>2014-10-29 16:17:52 -0400
commit36cd65e1ab232c3a876d7c10a366143a9546e2e7 (patch)
tree791a5cc58456794c2e154a7d187fadcf55b426c7
parent76e746d255dbc7f5e2f366f3d1857adb2ea87aea (diff)
downloadqtlocation-mapboxgl-36cd65e1ab232c3a876d7c10a366143a9546e2e7.tar.gz
patch gyp to allow common 'libraries' config for both osx and linux
-rw-r--r--deps/gyp/pylib/gyp/generator/make.py2
-rw-r--r--linux/mapboxgl-app.gyp62
2 files changed, 19 insertions, 45 deletions
diff --git a/deps/gyp/pylib/gyp/generator/make.py b/deps/gyp/pylib/gyp/generator/make.py
index b6f766d554..0b515bccd3 100644
--- a/deps/gyp/pylib/gyp/generator/make.py
+++ b/deps/gyp/pylib/gyp/generator/make.py
@@ -141,7 +141,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
# special "figure out circular dependencies" flags around the entire
# input list during linking.
quiet_cmd_link = LINK($(TOOLSET)) $@
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
+cmd_link = $(LINK.$(TOOLSET)) -Wl,--start-group $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) -Wl,--end-group
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
diff --git a/linux/mapboxgl-app.gyp b/linux/mapboxgl-app.gyp
index de7aa5b967..c2953ce534 100644
--- a/linux/mapboxgl-app.gyp
+++ b/linux/mapboxgl-app.gyp
@@ -13,52 +13,26 @@
'../platform/default/glfw_view.cpp',
'../platform/default/log_stderr.cpp',
],
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS':[
+ '<@(glfw3_cflags)',
+ ],
+ },
+ 'cflags_cc': [
+ '<@(glfw3_cflags)',
+ '-I<(boost_root)/include',
+ ],
'libraries': [
+ '-L<(PRODUCT_DIR)/',
+ '-lmbgl',
+ '-lmbgl-linux',
+ '<@(curl_static_libs)',
+ '<@(png_ldflags)',
+ '<@(sqlite3_ldflags)',
'<@(glfw3_static_libs)',
- ],
- 'conditions': [
- ['OS == "mac"',
-
- # Mac OS X
- {
- 'xcode_settings': {
- 'OTHER_CPLUSPLUSFLAGS':[
- '<@(glfw3_cflags)',
- ],
- },
- 'libraries': [
- '-L<(PRODUCT_DIR)/',
- '-lmbgl',
- '-lmbgl-linux',
- '<@(png_ldflags)',
- '<@(sqlite3_ldflags)',
- '<@(glfw3_ldflags)',
- '<@(curl_ldflags)',
- '<@(zlib_ldflags)',
- ]
- },
- # Non-Mac OS X
- {
- 'cflags_cc': [
- '<@(glfw3_cflags)',
- '-I<(boost_root)/include',
- ],
- 'libraries': [
- '-Wl,--start-group',
- '-L<(PRODUCT_DIR)/',
- '-lmbgl',
- '-lmbgl-linux',
- '<@(curl_static_libs)',
- '<@(png_ldflags)',
- '<@(sqlite3_ldflags)',
- '<@(glfw3_ldflags)',
- '-L<(boost_root)/lib',
- '-lboost_regex',
- '<@(curl_ldflags)',
- '<@(zlib_ldflags)',
- '-Wl,--end-group'
- ],
- }],
+ '<@(glfw3_ldflags)',
+ '<@(curl_ldflags)',
+ '<@(zlib_ldflags)',
],
'dependencies': [
'../mapboxgl.gyp:mbgl-standalone',