summaryrefslogtreecommitdiff
path: root/gyp
diff options
context:
space:
mode:
Diffstat (limited to 'gyp')
-rw-r--r--gyp/certificates.gypi3
-rw-r--r--gyp/common.gypi3
-rw-r--r--gyp/fixtures.gypi3
-rw-r--r--gyp/install.gypi23
-rw-r--r--gyp/mbgl-headless.gypi15
-rw-r--r--gyp/mbgl-ios.gypi (renamed from gyp/platform-ios.gypi)6
-rw-r--r--gyp/mbgl-linux.gypi (renamed from gyp/platform-linux.gypi)6
-rw-r--r--gyp/mbgl-osx.gypi (renamed from gyp/platform-osx.gypi)6
-rw-r--r--gyp/mbgl-platform.gypi16
-rw-r--r--gyp/mbgl.gypi (renamed from gyp/library.gypi)5
-rw-r--r--gyp/npm_install.gypi3
-rw-r--r--gyp/platform.gypi16
12 files changed, 71 insertions, 34 deletions
diff --git a/gyp/certificates.gypi b/gyp/certificates.gypi
index 6a358f0dbf..1d0c2acf86 100644
--- a/gyp/certificates.gypi
+++ b/gyp/certificates.gypi
@@ -1,7 +1,6 @@
{
'targets': [
- {
- 'target_name': 'copy_certificate_bundle',
+ { 'target_name': 'copy_certificate_bundle',
'type': 'none',
'hard_dependency': 1,
'copies': [{
diff --git a/gyp/common.gypi b/gyp/common.gypi
index 89a82fbdb9..6d6b0e6671 100644
--- a/gyp/common.gypi
+++ b/gyp/common.gypi
@@ -1,4 +1,7 @@
{
+ 'variables': {
+ 'install_prefix%': '',
+ },
'target_defaults': {
'default_configuration': 'Release',
'conditions': [
diff --git a/gyp/fixtures.gypi b/gyp/fixtures.gypi
index f290da5d53..199865a6f3 100644
--- a/gyp/fixtures.gypi
+++ b/gyp/fixtures.gypi
@@ -1,7 +1,6 @@
{
'targets': [
- {
- 'target_name': 'copy_fixtures',
+ { 'target_name': 'copy_fixtures',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
diff --git a/gyp/install.gypi b/gyp/install.gypi
new file mode 100644
index 0000000000..8b79a45180
--- /dev/null
+++ b/gyp/install.gypi
@@ -0,0 +1,23 @@
+{
+ 'conditions': [
+ ['install_prefix != ""', {
+ 'targets': [
+ { 'target_name': 'install',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'mbgl',
+ 'mbgl-headless',
+ 'mbgl-<(platform)',
+ ],
+ 'copies': [
+ { 'files': [ '<(PRODUCT_DIR)/libmbgl.a' ], 'destination': '<(install_prefix)/lib' },
+ { 'files': [ '<(PRODUCT_DIR)/libmbgl-headless.a' ], 'destination': '<(install_prefix)/lib' },
+ { 'files': [ '<(PRODUCT_DIR)/libmbgl-<(platform).a' ], 'destination': '<(install_prefix)/lib' },
+ { 'files': [ '../include/mbgl' ], 'destination': '<(install_prefix)/include' }
+ ],
+ },
+ ]
+ }],
+ ],
+}
diff --git a/gyp/mbgl-headless.gypi b/gyp/mbgl-headless.gypi
new file mode 100644
index 0000000000..5ffc251d22
--- /dev/null
+++ b/gyp/mbgl-headless.gypi
@@ -0,0 +1,15 @@
+{
+ 'targets': [
+ { 'target_name': 'mbgl-headless',
+ 'product_name': 'mbgl-headless',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '../include',
+ ],
+ 'sources': [
+ '../platform/default/headless_view.cpp',
+ '../platform/default/headless_display.cpp',
+ ],
+ },
+ ]
+} \ No newline at end of file
diff --git a/gyp/platform-ios.gypi b/gyp/mbgl-ios.gypi
index d070744925..e6fa50bd5a 100644
--- a/gyp/platform-ios.gypi
+++ b/gyp/mbgl-ios.gypi
@@ -18,10 +18,10 @@
],
},
'targets': [
- {
- 'target_name': 'mapboxgl-ios',
- 'product_name': 'mapboxgl-ios',
+ { 'target_name': 'mbgl-ios',
+ 'product_name': 'mbgl-ios',
'type': 'static_library',
+ 'hard_dependency': 1,
'include_dirs': [
'../include',
],
diff --git a/gyp/platform-linux.gypi b/gyp/mbgl-linux.gypi
index 9126652a7e..39a1755569 100644
--- a/gyp/platform-linux.gypi
+++ b/gyp/mbgl-linux.gypi
@@ -1,9 +1,9 @@
{
'targets': [
- {
- 'target_name': 'mapboxgl-linux',
- 'product_name': 'mapboxgl-linux',
+ { 'target_name': 'mbgl-linux',
+ 'product_name': 'mbgl-linux',
'type': 'static_library',
+ 'hard_dependency': 1,
'include_dirs': [
'../include'
],
diff --git a/gyp/platform-osx.gypi b/gyp/mbgl-osx.gypi
index adc0d3232c..ba117e5a59 100644
--- a/gyp/platform-osx.gypi
+++ b/gyp/mbgl-osx.gypi
@@ -1,9 +1,9 @@
{
'targets': [
- {
- 'target_name': 'mapboxgl-osx',
- 'product_name': 'mapboxgl-osx',
+ { 'target_name': 'mbgl-osx',
+ 'product_name': 'mbgl-osx',
'type': 'static_library',
+ 'hard_dependency': 1,
'include_dirs': [
'../include',
],
diff --git a/gyp/mbgl-platform.gypi b/gyp/mbgl-platform.gypi
new file mode 100644
index 0000000000..74ac9aecc6
--- /dev/null
+++ b/gyp/mbgl-platform.gypi
@@ -0,0 +1,16 @@
+{
+ 'conditions': [
+ ['platform == "osx"', {
+ 'includes': ['mbgl-osx.gypi'],
+ 'variables': { 'platform_library': 'mbgl-osx' },
+ }],
+ ['platform == "ios"', {
+ 'includes': ['mbgl-ios.gypi'],
+ 'variables': { 'platform_library': 'mbgl-ios' },
+ }],
+ ['platform == "linux"', {
+ 'includes': ['mbgl-linux.gypi'],
+ 'variables': { 'platform_library': 'mbgl-linux' },
+ }],
+ ],
+}
diff --git a/gyp/library.gypi b/gyp/mbgl.gypi
index bb86432dac..f268fd6255 100644
--- a/gyp/library.gypi
+++ b/gyp/mbgl.gypi
@@ -1,8 +1,7 @@
{
'targets': [
- {
- 'target_name': 'mapboxgl',
- 'product_name': 'mapboxgl',
+ { 'target_name': 'mbgl',
+ 'product_name': 'mbgl',
'type': 'static_library',
'hard_dependency': 1,
'dependencies': [
diff --git a/gyp/npm_install.gypi b/gyp/npm_install.gypi
index 07d2e3e00e..ddd3081ad5 100644
--- a/gyp/npm_install.gypi
+++ b/gyp/npm_install.gypi
@@ -1,7 +1,6 @@
{
'targets': [
- {
- 'target_name': 'npm_install',
+ { 'target_name': 'npm_install',
'type': 'none',
'hard_dependency': 1,
'actions': [
diff --git a/gyp/platform.gypi b/gyp/platform.gypi
deleted file mode 100644
index 605f3d7127..0000000000
--- a/gyp/platform.gypi
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- 'conditions': [
- ['platform == "osx"', {
- 'includes': ['platform-osx.gypi'],
- 'variables': { 'platform_library': 'mapboxgl-osx' },
- }],
- ['platform == "ios"', {
- 'includes': ['platform-ios.gypi'],
- 'variables': { 'platform_library': 'mapboxgl-ios' },
- }],
- ['platform == "linux"', {
- 'includes': ['platform-linux.gypi'],
- 'variables': { 'platform_library': 'mapboxgl-linux' },
- }],
- ],
-}