patch gyp to allow common 'libraries' config for both osx and linux
This commit is contained in:
2
deps/gyp/pylib/gyp/generator/make.py
vendored
2
deps/gyp/pylib/gyp/generator/make.py
vendored
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user