patch gyp to allow common 'libraries' config for both osx and linux

This commit is contained in:
Dane Springmeyer
2014-10-29 16:17:52 -04:00
parent 76e746d255
commit 36cd65e1ab
2 changed files with 20 additions and 46 deletions

View File

@@ -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

View File

@@ -13,52 +13,26 @@
'../platform/default/glfw_view.cpp',
'../platform/default/log_stderr.cpp',
],
'libraries': [
'<@(glfw3_static_libs)',
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS':[
'<@(glfw3_cflags)',
],
},
'cflags_cc': [
'<@(glfw3_cflags)',
'-I<(boost_root)/include',
],
'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'
],
}],
'libraries': [
'-L<(PRODUCT_DIR)/',
'-lmbgl',
'-lmbgl-linux',
'<@(curl_static_libs)',
'<@(png_ldflags)',
'<@(sqlite3_ldflags)',
'<@(glfw3_static_libs)',
'<@(glfw3_ldflags)',
'<@(curl_ldflags)',
'<@(zlib_ldflags)',
],
'dependencies': [
'../mapboxgl.gyp:mbgl-standalone',