diff options
-rw-r--r-- | gyp/mbgl-core.gypi | 36 | ||||
-rw-r--r-- | gyp/mbgl-linux.gypi | 6 | ||||
-rw-r--r-- | linux/mapboxgl-app.gyp | 31 |
3 files changed, 30 insertions, 43 deletions
diff --git a/gyp/mbgl-core.gypi b/gyp/mbgl-core.gypi index d6a9dd8fbc..c4b6712833 100644 --- a/gyp/mbgl-core.gypi +++ b/gyp/mbgl-core.gypi @@ -19,12 +19,6 @@ 'cflags': [ '<@(uv_cflags)', ], - 'ldflags': [ - '<@(png_ldflags)', - '<@(uv_ldflags)', - '<@(sqlite3_ldflags)', - '<@(zlib_ldflags)', - ], }, 'sources': [ '<!@(find src -name "*.cpp")', @@ -39,14 +33,6 @@ 'include_dirs': [ '../include', ], - 'link_settings': { - 'libraries': [ - '<@(png_static_libs)', - '<@(uv_static_libs)', - '<@(sqlite3_static_libs)', - '<@(zlib_static_libs)', - ], - }, 'conditions': [ ['OS == "mac"', { 'xcode_settings': { @@ -57,21 +43,7 @@ 'cflags_cc': [ '<@(cflags_cc)' ], 'cflags': [ '<@(cflags)' ], }] - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '../include', - ], - 'conditions': [ - ['OS == "mac"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': [ '<@(ldflags)' ] - } - }, { - 'ldflags': [ '<@(ldflags)' ] - }] - ] - } + ] }, { 'target_name': 'mbgl-standalone', @@ -80,6 +52,11 @@ 'core_lib':'<(PRODUCT_DIR)/libmbgl-core.a', 'standalone_lib':'<(PRODUCT_DIR)/libmbgl.a' }, + 'direct_dependent_settings': { + 'include_dirs': [ + '../include', + ], + }, 'actions': [ { 'action_name': 'build standalone core lib', @@ -93,6 +70,7 @@ './gyp/merge_static_libs.py', '<(standalone_lib)', '<@(uv_static_libs)', + '<@(curl_static_libs)', '<(core_lib)' ], } diff --git a/gyp/mbgl-linux.gypi b/gyp/mbgl-linux.gypi index f1ff1e3c95..337e98039e 100644 --- a/gyp/mbgl-linux.gypi +++ b/gyp/mbgl-linux.gypi @@ -27,12 +27,6 @@ 'include_dirs': [ '../include', ], - 'link_settings': { - 'libraries': [ - '<@(uv_static_libs)', - '<@(curl_static_libs)', - ], - }, 'conditions': [ ['OS == "mac"', { 'xcode_settings': { diff --git a/linux/mapboxgl-app.gyp b/linux/mapboxgl-app.gyp index 77e4a5ab07..098b2bee93 100644 --- a/linux/mapboxgl-app.gyp +++ b/linux/mapboxgl-app.gyp @@ -25,28 +25,43 @@ 'OTHER_CPLUSPLUSFLAGS':[ '<@(glfw3_cflags)', ], - 'OTHER_LDFLAGS': [ - '<@(glfw3_ldflags)', - ], - } + }, + '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', ], - 'ldflags': [ + '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' ], }], ], 'dependencies': [ - '../mapboxgl.gyp:mbgl-core', - '../mapboxgl.gyp:mbgl-linux', + '../mapboxgl.gyp:mbgl-standalone', '../mapboxgl.gyp:copy_styles', '../mapboxgl.gyp:copy_certificate_bundle', ], |