gyp: add osmesa target to factor out common code
Test this out with `GYP_DEFINES=skia_mesa=1`. Also uses the `library_dirs` keyword, which is relatively new. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903233002 Review URL: https://codereview.chromium.org/1903233002
This commit is contained in:
parent
f8c74a1ef9
commit
906021334f
@ -32,23 +32,7 @@
|
||||
'<!@(python find.py ../tools/gpu "*")'
|
||||
],
|
||||
'conditions': [
|
||||
[ 'skia_mesa and skia_os == "linux"', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lOSMesa',
|
||||
],
|
||||
},
|
||||
}],
|
||||
[ 'skia_mesa and skia_os == "mac"', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'/opt/X11/lib/libOSMesa.dylib',
|
||||
],
|
||||
},
|
||||
'include_dirs': [
|
||||
'/opt/X11/include/',
|
||||
],
|
||||
}],
|
||||
[ 'skia_mesa', { 'dependencies': [ 'osmesa' ] } ],
|
||||
[ 'skia_angle', {
|
||||
'dependencies': [
|
||||
'angle.gyp:*',
|
||||
@ -121,5 +105,18 @@
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'osmesa',
|
||||
'type': 'none',
|
||||
'direct_dependent_settings': {
|
||||
'link_settings': { 'libraries': [ '-lOSMesa', ], },
|
||||
'conditions': [
|
||||
[ 'skia_os == "mac"', {
|
||||
'link_settings': { 'library_dirs' : [ '/opt/X11/lib' ], },
|
||||
'include_dirs': [ '/opt/X11/include', ],
|
||||
}],
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
@ -351,7 +351,7 @@
|
||||
'../tools/picture_utils.cpp',
|
||||
'../tools/picture_utils.h',
|
||||
],
|
||||
'include_dirs': [
|
||||
'include_dirs': [
|
||||
'../src/core/',
|
||||
],
|
||||
'dependencies': [
|
||||
@ -608,18 +608,9 @@
|
||||
'dependencies': [
|
||||
'skia_lib.gyp:skia_lib',
|
||||
'pdf.gyp:pdf',
|
||||
'gputest.gyp:osmesa',
|
||||
],
|
||||
'defines': [ 'FIDDLE_BUILD_TEST' ],
|
||||
'conditions': [
|
||||
[ 'skia_os == "mac"',
|
||||
{
|
||||
'link_settings': { 'libraries': [ '/opt/X11/lib/libOSMesa.dylib', ], },
|
||||
'include_dirs': [ '/opt/X11/include/', ],
|
||||
}, {
|
||||
'link_settings': { 'libraries': [ '-lOSMesa' ], },
|
||||
}
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user