summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorborenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-11 15:52:19 +0000
committerborenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-11 15:52:19 +0000
commit881ed1e16a5ba46427557a2b03e7d699f1cb291c (patch)
tree9e29624fb1a117f2c0c27598ca4852da64c4f540
parentf5384d9cdb6e00ae44db91f3bc16e009c143faa9 (diff)
downloadgyp-881ed1e16a5ba46427557a2b03e7d699f1cb291c.tar.gz
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/gyp@9505 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--SampleApp.gyp2
-rw-r--r--bench.gyp4
-rw-r--r--chromeos_deps.gyp9
-rw-r--r--common.gypi6
-rw-r--r--common_conditions.gypi44
-rw-r--r--common_variables.gypi2
-rw-r--r--core.gyp2
-rw-r--r--debugger.gyp2
-rw-r--r--gpu.gyp6
-rw-r--r--images.gyp10
-rw-r--r--opts.gyp4
-rw-r--r--pixman_test.gyp2
-rw-r--r--ports.gyp2
-rw-r--r--shapeops_demo.gyp2
-rw-r--r--utils.gyp4
-rw-r--r--views.gyp2
-rw-r--r--xml.gyp2
17 files changed, 71 insertions, 34 deletions
diff --git a/SampleApp.gyp b/SampleApp.gyp
index 59d2f84..94dd37b 100644
--- a/SampleApp.gyp
+++ b/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/bench.gyp b/bench.gyp
index 49e6c2c..27f80ce 100644
--- a/bench.gyp
+++ b/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/chromeos_deps.gyp b/chromeos_deps.gyp
new file mode 100644
index 0000000..8863791
--- /dev/null
+++ b/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/common.gypi b/common.gypi
index 2be8bb8..05fdbf4 100644
--- a/common.gypi
+++ b/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/common_conditions.gypi b/common_conditions.gypi
index 48025af..cceb556 100644
--- a/common_conditions.gypi
+++ b/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/common_variables.gypi b/common_variables.gypi
index ac937bd..9f65b34 100644
--- a/common_variables.gypi
+++ b/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/core.gyp b/core.gyp
index d018cbe..bebcad6 100644
--- a/core.gyp
+++ b/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/debugger.gyp b/debugger.gyp
index 9ea300d..fcaa6c6 100644
--- a/debugger.gyp
+++ b/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/gpu.gyp b/gpu.gyp
index efe757d..efd0242 100644
--- a/gpu.gyp
+++ b/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/images.gyp b/images.gyp
index 44f944c..df22026 100644
--- a/images.gyp
+++ b/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/opts.gyp b/opts.gyp
index 30f464f..2c87b81 100644
--- a/opts.gyp
+++ b/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/pixman_test.gyp b/pixman_test.gyp
index a571dd7..3a39b90 100644
--- a/pixman_test.gyp
+++ b/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/ports.gyp b/ports.gyp
index af6229e..526e920 100644
--- a/ports.gyp
+++ b/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/shapeops_demo.gyp b/shapeops_demo.gyp
index 83836ee..ff5c3da 100644
--- a/shapeops_demo.gyp
+++ b/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/utils.gyp b/utils.gyp
index ef2a0d8..4ac9284 100644
--- a/utils.gyp
+++ b/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/views.gyp b/views.gyp
index aca3bb3..182bb34 100644
--- a/views.gyp
+++ b/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/xml.gyp b/xml.gyp
index 5cf0659..2c4e06f 100644
--- a/xml.gyp
+++ b/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',