diff options
author | borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-11 15:52:19 +0000 |
---|---|---|
committer | borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-11 15:52:19 +0000 |
commit | 881ed1e16a5ba46427557a2b03e7d699f1cb291c (patch) | |
tree | 9e29624fb1a117f2c0c27598ca4852da64c4f540 | |
parent | f5384d9cdb6e00ae44db91f3bc16e009c143faa9 (diff) | |
download | gyp-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.gyp | 2 | ||||
-rw-r--r-- | bench.gyp | 4 | ||||
-rw-r--r-- | chromeos_deps.gyp | 9 | ||||
-rw-r--r-- | common.gypi | 6 | ||||
-rw-r--r-- | common_conditions.gypi | 44 | ||||
-rw-r--r-- | common_variables.gypi | 2 | ||||
-rw-r--r-- | core.gyp | 2 | ||||
-rw-r--r-- | debugger.gyp | 2 | ||||
-rw-r--r-- | gpu.gyp | 6 | ||||
-rw-r--r-- | images.gyp | 10 | ||||
-rw-r--r-- | opts.gyp | 4 | ||||
-rw-r--r-- | pixman_test.gyp | 2 | ||||
-rw-r--r-- | ports.gyp | 2 | ||||
-rw-r--r-- | shapeops_demo.gyp | 2 | ||||
-rw-r--r-- | utils.gyp | 4 | ||||
-rw-r--r-- | views.gyp | 2 | ||||
-rw-r--r-- | xml.gyp | 2 |
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', ], @@ -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', @@ -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', @@ -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', @@ -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', @@ -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"', { }], @@ -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"', { }], @@ -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', ], @@ -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', @@ -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', |