summaryrefslogtreecommitdiff
path: root/gyp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-01-30 11:48:29 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-02-04 10:49:09 +0100
commit50d78fde85a6d2cee2e28f3681b4808b69133088 (patch)
tree99d764aee3f607f58d417d90b768512628330a09 /gyp
parent4b3689d18e2ef12ade8471b2f0c12db7d92a5e8d (diff)
downloadqtlocation-mapboxgl-50d78fde85a6d2cee2e28f3681b4808b69133088.tar.gz
fix install script
Diffstat (limited to 'gyp')
-rw-r--r--gyp/common.gypi1
-rw-r--r--gyp/install.gypi101
-rwxr-xr-xgyp/link.py11
3 files changed, 43 insertions, 70 deletions
diff --git a/gyp/common.gypi b/gyp/common.gypi
index 301856c52f..7cf13fff6e 100644
--- a/gyp/common.gypi
+++ b/gyp/common.gypi
@@ -1,7 +1,6 @@
{
'variables': {
'install_prefix%': '',
- 'standalone_product_dir':'<!@(pwd)/build',
},
'target_defaults': {
'default_configuration': 'Release',
diff --git a/gyp/install.gypi b/gyp/install.gypi
index cd5bdf30d6..ac7abad1df 100644
--- a/gyp/install.gypi
+++ b/gyp/install.gypi
@@ -1,76 +1,39 @@
{
- 'conditions': [
- ['install_prefix != ""', {
- 'targets': [
- { 'target_name': 'install',
- 'type': 'none',
- 'hard_dependency': 1,
- 'dependencies': [
- 'core',
- 'platform-<(platform_lib)',
- 'http-<(http_lib)',
- 'asset-<(asset_lib)',
- 'cache-<(cache_lib)',
- 'headless-<(headless_lib)',
- 'standalone',
+ 'targets': [
+ { 'target_name': 'install',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'core',
+ 'platform-<(platform_lib)',
+ 'http-<(http_lib)',
+ 'asset-<(asset_lib)',
+ 'cache-<(cache_lib)',
+ 'headless-<(headless_lib)',
+ 'standalone',
+ ],
+ 'copies': [
+ { 'files': [ '<(PRODUCT_DIR)/libmbgl.a' ], 'destination': '<(install_prefix)/lib' },
+ { 'files': [ '../include/mbgl' ], 'destination': '<(install_prefix)/include' },
+ { 'files': [ '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/util/version.hpp' ], 'destination': '<(install_prefix)/include/mbgl/util' },
+ ],
+
+ 'actions': [
+ { 'action_name': 'mbgl-config',
+ 'inputs': [
+ '../utils/mbgl-config/mbgl-config.template.sh',
+ '../utils/mbgl-config/build.sh',
],
- 'copies': [
- { 'files': [ '<(standalone_product_dir)/libmbgl.a' ], 'destination': '<(install_prefix)/lib' },
- { 'files': [ '<(PRODUCT_DIR)/libmbgl-core.a' ], 'destination': '<(install_prefix)/lib' },
- { 'files': [ '<(PRODUCT_DIR)/lib<(headless_lib).a' ], 'destination': '<(install_prefix)/lib' },
- { 'files': [ '<(PRODUCT_DIR)/lib<(platform_lib).a' ], 'destination': '<(install_prefix)/lib' },
- { 'files': [ '<(PRODUCT_DIR)/lib<(http_lib).a' ], 'destination': '<(install_prefix)/lib' },
- { 'files': [ '<(PRODUCT_DIR)/lib<(asset_lib).a' ], 'destination': '<(install_prefix)/lib' },
- { 'files': [ '<(PRODUCT_DIR)/lib<(cache_lib).a' ], 'destination': '<(install_prefix)/lib' },
- { 'files': [ '../include/mbgl' ], 'destination': '<(install_prefix)/include' },
+ 'outputs': [
+ '<(install_prefix)/bin/mbgl-config',
],
- 'variables': {
- 'conditions': [
- ['OS == "linux"', {
- 'other_ldflags': [
- '<@(nu_static_libs)',
- '<@(png_static_libs)',
- '<@(jpeg_static_libs)',
- '<@(glfw3_static_libs)',
- '<@(glfw3_ldflags)',
- ]
- }, {
- 'other_ldflags': [ ]
- }]
- ],
- },
- 'actions': [
- { 'action_name': 'mbgl-config',
- 'inputs': [
- '../utils/mbgl-config/mbgl-config.template.sh',
- '../utils/mbgl-config/build.sh',
- ],
- 'outputs': [
- '<(install_prefix)/bin/mbgl-config',
- ],
- 'action': [
- './utils/mbgl-config/build.sh',
- '<(install_prefix)',
- '<@(sqlite3_static_libs)',
- '<@(sqlite3_ldflags)',
- '<@(curl_ldflags)',
- '<@(png_ldflags)',
- '<@(other_ldflags)'
- ]
- }
+ 'action': [
+ './utils/mbgl-config/build.sh',
+ '<(install_prefix)',
+ '<(PRODUCT_DIR)/libmbgl.a.ldflags',
]
- },
- { 'target_name': 'copy_version',
- 'type': 'none',
- 'hard_dependency': 1,
- 'dependencies': [
- 'install',
- ],
- 'copies': [
- { 'files': [ '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/util/version.hpp' ], 'destination': '<(install_prefix)/include/mbgl/util' },
- ],
}
]
- }],
- ],
+ },
+ ]
}
diff --git a/gyp/link.py b/gyp/link.py
index cab61aa9e6..347dfe7a2b 100755
--- a/gyp/link.py
+++ b/gyp/link.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
+import os
from merge_static_libs import MergeLibs
args = sys.argv[1:]
@@ -31,4 +32,14 @@ while i < l:
i += 1
+flags.reverse()
+unique_flags = []
+for flag in flags:
+ if flag not in unique_flags:
+ unique_flags.append(flag)
+unique_flags.reverse()
+
+with open(out_lib + '.ldflags', 'w+') as f:
+ f.write(' '.join(unique_flags));
+
MergeLibs(in_libs, out_lib)