aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-11 15:52:19 +0000
committerGravatar borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-11 15:52:19 +0000
commit05d550ed364d459233874a6dcc1af3c95f195548 (patch)
tree30e2e75bee379db7d61a5d96212bb437cb3c1873 /gyp
parent82f317815e182fd2e34a8a41eba9ea90e01b0846 (diff)
GYP Changes and Scripts for Compiling Skia for ChromeOS
For now, this requires having a complete ChromeOS checkout. R=djsollen@google.com Review URL: https://codereview.chromium.org/16099011 git-svn-id: http://skia.googlecode.com/svn/trunk@9505 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gyp')
-rw-r--r--gyp/SampleApp.gyp2
-rw-r--r--gyp/bench.gyp4
-rw-r--r--gyp/chromeos_deps.gyp9
-rw-r--r--gyp/common.gypi6
-rw-r--r--gyp/common_conditions.gypi44
-rw-r--r--gyp/common_variables.gypi2
-rw-r--r--gyp/core.gyp2
-rw-r--r--gyp/debugger.gyp2
-rw-r--r--gyp/gpu.gyp6
-rw-r--r--gyp/images.gyp10
-rw-r--r--gyp/opts.gyp4
-rw-r--r--gyp/pixman_test.gyp2
-rw-r--r--gyp/ports.gyp2
-rw-r--r--gyp/shapeops_demo.gyp2
-rw-r--r--gyp/utils.gyp4
-rw-r--r--gyp/views.gyp2
-rw-r--r--gyp/xml.gyp2
17 files changed, 71 insertions, 34 deletions
diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp
index 59d2f84d32..94dd37b4f1 100644
--- a/gyp/SampleApp.gyp
+++ b/gyp/SampleApp.gyp
@@ -152,7 +152,7 @@
'lua.gyp:lua',
],
'conditions' : [
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
'sources!': [
'../samplecode/SampleDecode.cpp',
],
diff --git a/gyp/bench.gyp b/gyp/bench.gyp
index 49e6c2c103..27f80cead9 100644
--- a/gyp/bench.gyp
+++ b/gyp/bench.gyp
@@ -57,13 +57,13 @@
'../bench/BenchSysTimer_mach.cpp',
],
}],
- [ 'skia_os not in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
+ [ 'skia_os not in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
'sources!': [
'../bench/BenchSysTimer_posix.h',
'../bench/BenchSysTimer_posix.cpp',
],
}],
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
'link_settings': {
'libraries': [
'-lrt',
diff --git a/gyp/chromeos_deps.gyp b/gyp/chromeos_deps.gyp
new file mode 100644
index 0000000000..88637915c3
--- /dev/null
+++ b/gyp/chromeos_deps.gyp
@@ -0,0 +1,9 @@
+# This GYP file stores the dependencies necessary to build Skia on the Chrome OS
+# platform. The OS doesn't provide many stable libraries as part of the
+# distribution so we have to build a few of them ourselves.
+
+{
+ 'includes': [
+ '../platform_tools/chromeos/gyp/dependencies.gypi',
+ ],
+}
diff --git a/gyp/common.gypi b/gyp/common.gypi
index 2be8bb8142..05fdbf4012 100644
--- a/gyp/common.gypi
+++ b/gyp/common.gypi
@@ -37,6 +37,12 @@
[ 'skia_os == "nacl" and OS != "linux"', {
'error': '<!(Skia NaCl build only currently supported on Linux.)',
}],
+ [ 'skia_os == "chromeos" and OS != "linux"', {
+ 'error': '<!(Skia ChromeOS build is only supported on Linux.)',
+ }],
+ [ 'skia_os == "chromeos" and not skia_cros_target', {
+ 'error': '<!(skia_cros_target must be defined for ChromeOS)',
+ }],
],
},
# Validate the 'skia_os' setting against 'skia_shared_lib', because shared
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index 48025af38e..cceb5562f9 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -117,7 +117,7 @@
},
],
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]',
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]',
{
'defines': [
'SK_SAMPLES_FOR_X',
@@ -145,22 +145,6 @@
'-Werror',
],
}],
- [ 'skia_arch_width == 64', {
- 'cflags': [
- '-m64',
- ],
- 'ldflags': [
- '-m64',
- ],
- }],
- [ 'skia_arch_width == 32', {
- 'cflags': [
- '-m32',
- ],
- 'ldflags': [
- '-m32',
- ],
- }],
[ 'skia_os == "nacl"', {
'defines': [
'SK_BUILD_FOR_NACL',
@@ -178,6 +162,32 @@
'/usr/include/freetype2',
],
}],
+ [ 'skia_os == "chromeos"', {
+ 'ldflags': [
+ '--sysroot=/build/<(skia_cros_target)',
+ '-lstdc++',
+ '-lm',
+ ],
+ }, {
+ 'conditions': [
+ [ 'skia_arch_width == 64', {
+ 'cflags': [
+ '-m64',
+ ],
+ 'ldflags': [
+ '-m64',
+ ],
+ }],
+ [ 'skia_arch_width == 32', {
+ 'cflags': [
+ '-m32',
+ ],
+ 'ldflags': [
+ '-m32',
+ ],
+ }],
+ ],
+ }],
],
},
],
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index ac937bd5c5..9f65b34845 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -127,6 +127,8 @@
'ios_sdk_version%': '6.0',
'skia_win_debuggers_path%': '<(skia_win_debuggers_path)',
+ 'skia_cros_target%': '',
+
# These are referenced by our .gypi files that list files (e.g. core.gypi)
#
'skia_src_path%': '../src',
diff --git a/gyp/core.gyp b/gyp/core.gyp
index d018cbea23..bebcad6f98 100644
--- a/gyp/core.gyp
+++ b/gyp/core.gyp
@@ -29,7 +29,7 @@
],
'msvs_disabled_warnings': [4244, 4267,4345, 4390, 4554, 4800],
'conditions': [
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
'link_settings': {
'libraries': [
'-lpthread',
diff --git a/gyp/debugger.gyp b/gyp/debugger.gyp
index 9ea300d9b2..fcaa6c67a5 100644
--- a/gyp/debugger.gyp
+++ b/gyp/debugger.gyp
@@ -1,7 +1,7 @@
{
'variables': {
'conditions': [
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
# Use the systemwide Qt libs by default
'variables': {
'qt_sdk%': '/usr',
diff --git a/gyp/gpu.gyp b/gyp/gpu.gyp
index efe757de0a..efd0242c0a 100644
--- a/gyp/gpu.gyp
+++ b/gyp/gpu.gyp
@@ -9,7 +9,7 @@
'sources/': [ ['exclude', '_mac.(h|cpp|m|mm)$'],
],
}],
- ['skia_os != "linux"', {
+ ['skia_os != "linux" and skia_os != "chromeos"', {
'sources/': [ ['exclude', '_unix.(h|cpp)$'],
],
}],
@@ -35,7 +35,7 @@
'GR_MAC_BUILD=1',
],
}],
- [ 'skia_os == "linux"', {
+ [ 'skia_os == "linux" or skia_os == "chromeos"', {
'defines': [
'GR_LINUX_BUILD=1',
],
@@ -232,7 +232,7 @@
'GR_ANDROID_PATH_RENDERING=1',
],
}],
- [ 'skia_os == "linux"', {
+ [ 'skia_os == "linux" or skia_os == "chromeos"', {
'sources!': [
'../src/gpu/gl/GrGLDefaultInterface_none.cpp',
'../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
diff --git a/gyp/images.gyp b/gyp/images.gyp
index 44f944cc36..df220265fb 100644
--- a/gyp/images.gyp
+++ b/gyp/images.gyp
@@ -149,6 +149,16 @@
'../src/images/SkImageRef_ashmem.cpp',
],
}],
+ [ 'skia_os == "chromeos"', {
+ 'dependencies': [
+ 'chromeos_deps.gyp:gif',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '-lpng',
+ ],
+ },
+ }],
[ 'skia_os == "ios"', {
'include_dirs': [
'../include/utils/mac',
diff --git a/gyp/opts.gyp b/gyp/opts.gyp
index 30f464f37d..2c87b81fc1 100644
--- a/gyp/opts.gyp
+++ b/gyp/opts.gyp
@@ -32,7 +32,7 @@
'conditions': [
[ 'skia_arch_type == "x86" and skia_os != "ios"', {
'conditions': [
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]', {
'cflags': [
'-msse2',
],
@@ -113,7 +113,7 @@
'../src/core',
],
'conditions': [
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]', {
'cflags': [
'-mssse3',
],
diff --git a/gyp/pixman_test.gyp b/gyp/pixman_test.gyp
index a571dd79ef..3a39b9033f 100644
--- a/gyp/pixman_test.gyp
+++ b/gyp/pixman_test.gyp
@@ -125,7 +125,7 @@
'xml.gyp:xml',
],
'conditions': [
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
}],
[ 'skia_os == "win"', {
}],
diff --git a/gyp/ports.gyp b/gyp/ports.gyp
index af6229e6b2..526e92032d 100644
--- a/gyp/ports.gyp
+++ b/gyp/ports.gyp
@@ -39,7 +39,7 @@
'../src/ports/SkXMLParser_empty.cpp',
],
'conditions': [
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
'defines': [
#The font host requires at least FreeType 2.3.0 at runtime.
'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020300',\
diff --git a/gyp/shapeops_demo.gyp b/gyp/shapeops_demo.gyp
index 83836ee730..ff5c3da9f7 100644
--- a/gyp/shapeops_demo.gyp
+++ b/gyp/shapeops_demo.gyp
@@ -74,7 +74,7 @@
'xml.gyp:xml',
],
'conditions' : [
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
}],
[ 'skia_os == "win"', {
}],
diff --git a/gyp/utils.gyp b/gyp/utils.gyp
index ef2a0d8423..4ac9284d53 100644
--- a/gyp/utils.gyp
+++ b/gyp/utils.gyp
@@ -146,11 +146,11 @@
'../src/utils/SkThreadUtils_pthread_mach.cpp',
],
}],
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
'sources!': [
'../src/utils/SkThreadUtils_pthread_other.cpp',
],
- },{ #else if 'skia_os not in ["linux", "freebsd", "openbsd", "solaris"]'
+ },{ #else if 'skia_os not in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]'
'include_dirs!': [
'../include/utils/unix',
],
diff --git a/gyp/views.gyp b/gyp/views.gyp
index aca3bb337a..182bb34ee4 100644
--- a/gyp/views.gyp
+++ b/gyp/views.gyp
@@ -98,7 +98,7 @@
'../src/views/mac/skia_mac.mm',
],
}],
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
'link_settings': {
'libraries': [
'-lGL',
diff --git a/gyp/xml.gyp b/gyp/xml.gyp
index 5cf06594b1..2c4e06f8d1 100644
--- a/gyp/xml.gyp
+++ b/gyp/xml.gyp
@@ -32,7 +32,7 @@
'../src/xml/SkXMLPullParser.cpp', #if 0 around class decl in header
],
'conditions': [
- [ 'skia_os in ["win", "mac", "linux", "freebsd", "openbsd", "solaris", "android", "ios", "nacl"]', {
+ [ 'skia_os in ["win", "mac", "linux", "freebsd", "openbsd", "solaris", "android", "ios", "nacl", "chromeos"]', {
'sources!': [
# no jsapi.h by default on system
'../include/xml/SkJS.h',