diff options
author | zachr@google.com <zachr@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-20 17:15:05 +0000 |
---|---|---|
committer | zachr@google.com <zachr@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-20 17:15:05 +0000 |
commit | 28c27c8b795db712c76d79b8cd62b3626ac148ec (patch) | |
tree | fa8dc9aa5173ed58a40fb61158ba7dd983d467eb /gyp | |
parent | def9f6e3eb45bf1940b848e44871da73af0d7301 (diff) |
enable shared lib support in linux for lua
R=bungeman@google.com, reed@google.com
Review URL: https://codereview.chromium.org/16099014
git-svn-id: http://skia.googlecode.com/svn/trunk@9703 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gyp')
-rw-r--r-- | gyp/common.gypi | 9 | ||||
-rw-r--r-- | gyp/common_conditions.gypi | 11 | ||||
-rw-r--r-- | gyp/tools.gyp | 44 |
3 files changed, 55 insertions, 9 deletions
diff --git a/gyp/common.gypi b/gyp/common.gypi index 05fdbf4012..54c14cd59a 100644 --- a/gyp/common.gypi +++ b/gyp/common.gypi @@ -45,15 +45,6 @@ }], ], }, - # Validate the 'skia_os' setting against 'skia_shared_lib', because shared - # library build is only supported on Android. - 'variables': { - 'conditions': [ - [ 'skia_os != "android" and skia_shared_lib', { - 'error': '<!(Skia shared lib build only currently supported on Android.)', - }], - ], - }, 'includes': [ 'common_conditions.gypi', ], diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index 54e4ad6f6f..3a49f1449e 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -149,6 +149,17 @@ '-Wno-c++11-extensions' ], 'conditions' : [ + [ 'skia_shared_lib', { + 'cflags': [ + '-fPIC', + ], + 'defines': [ + 'GR_DLL=1', + 'GR_IMPLEMENTATION=1', + 'SKIA_DLL', + 'SKIA_IMPLEMENTATION=1', + ], + }], [ 'skia_warnings_as_errors', { 'cflags': [ '-Werror', diff --git a/gyp/tools.gyp b/gyp/tools.gyp index d960cdc128..de1d8e94a8 100644 --- a/gyp/tools.gyp +++ b/gyp/tools.gyp @@ -24,6 +24,15 @@ 'skhello', 'skimage', ], + 'conditions': [ + ['skia_shared_lib', + { + 'dependencies': [ + 'sklua', # This can only be built if skia is built as a shared library + ], + }, + ], + ], }, { 'target_name': 'skdiff', @@ -97,6 +106,7 @@ 'utils.gyp:utils', ], }, + { 'target_name': 'lua_app', 'type': 'executable', @@ -312,6 +322,40 @@ }, ], 'conditions': [ + ['skia_shared_lib', + { + 'targets': [ + { + 'target_name': 'sklua', + 'product_name': 'skia', + 'product_prefix': '', + 'product_dir': '<(PRODUCT_DIR)/', + 'type': 'shared_library', + 'sources': [ + '../src/utils/SkLuaCanvas.cpp', + '../src/utils/SkLua.cpp', + ], + 'include_dirs': [ + '../third_party/lua/src/', + ], + 'dependencies': [ + 'lua.gyp:lua', + 'pdf.gyp:pdf', + 'skia_lib.gyp:skia_lib', + ], + 'conditions': [ + ['skia_os != "win"', + { + 'ldflags': [ + '-Wl,-rpath,\$$ORIGIN,--enable-new-dtags', + ], + }, + ], + ], + }, + ], + }, + ], ['skia_win_debuggers_path and skia_os == "win"', { 'targets': [ |