jvanverth | 9f37246 | 2016-04-06 06:08:59 -0700 | [diff] [blame] | 1 | # Copyright 2016 Google Inc. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | # GYP file to build performance testbench. |
| 6 | # |
| 7 | { |
| 8 | 'includes': [ |
| 9 | 'apptype_console.gypi', |
| 10 | ], |
| 11 | 'targets': [ |
| 12 | { |
jvanverth | 3452426 | 2016-05-04 13:49:13 -0700 | [diff] [blame] | 13 | 'target_name': 'viewer', |
jvanverth | 9f37246 | 2016-04-06 06:08:59 -0700 | [diff] [blame] | 14 | 'type': 'executable', |
| 15 | 'includes' : [ |
| 16 | 'gmslides.gypi', |
jvanverth | c7027ab | 2016-06-16 09:52:35 -0700 | [diff] [blame] | 17 | 'samples.gypi', |
jvanverth | 9f37246 | 2016-04-06 06:08:59 -0700 | [diff] [blame] | 18 | ], |
| 19 | 'include_dirs': [ |
| 20 | '../bench', |
| 21 | '../gm', |
| 22 | '../include/private', |
| 23 | '../src/core', |
| 24 | '../src/effects', |
| 25 | '../src/gpu', |
egdaniel | f533f11 | 2016-06-13 11:30:10 -0700 | [diff] [blame] | 26 | '../src/image', |
jvanverth | c7027ab | 2016-06-16 09:52:35 -0700 | [diff] [blame] | 27 | '../src/images', |
| 28 | '../src/pathops', |
jvanverth | 1d15596 | 2016-05-23 13:13:36 -0700 | [diff] [blame] | 29 | '../src/views/unix', |
jvanverth | 3d6ed3a | 2016-04-07 11:09:51 -0700 | [diff] [blame] | 30 | '../tools/timer', |
jvanverth | 9f37246 | 2016-04-06 06:08:59 -0700 | [diff] [blame] | 31 | ], |
| 32 | 'sources': [ |
| 33 | '../gm/gm.cpp', |
mtklein | ada5a44 | 2016-08-02 14:28:26 -0700 | [diff] [blame] | 34 | '<!@(python find.py "*.cpp" ../tools/viewer)', |
jvanverth | 1ba1d37 | 2016-08-04 12:30:31 -0700 | [diff] [blame] | 35 | '<!@(python find.py "*.h" ../tools/viewer)', |
jvanverth | c7027ab | 2016-06-16 09:52:35 -0700 | [diff] [blame] | 36 | |
| 37 | # views (subset of files for the Android build) |
| 38 | '../src/views/SkEvent.cpp', |
| 39 | '../src/views/SkEventSink.cpp', |
| 40 | '../src/views/SkOSMenu.cpp', |
| 41 | '../src/views/SkTagList.cpp', |
| 42 | '../src/views/SkTagList.h', |
| 43 | '../src/views/SkTouchGesture.cpp', |
| 44 | '../src/views/SkView.cpp', |
| 45 | '../src/views/SkViewPriv.cpp', |
| 46 | '../src/views/SkViewPriv.h', |
| 47 | '../src/views/unix/keysym2ucs.c', |
jvanverth | 9f37246 | 2016-04-06 06:08:59 -0700 | [diff] [blame] | 48 | ], |
jvanverth | c7027ab | 2016-06-16 09:52:35 -0700 | [diff] [blame] | 49 | 'sources!': [ |
| 50 | '../samplecode/SampleSkLayer.cpp', #relies on SkMatrix44 which doesn't compile |
| 51 | '../samplecode/SampleFontCache.cpp', #relies on pthread.h |
mtklein | ada5a44 | 2016-08-02 14:28:26 -0700 | [diff] [blame] | 52 | ], |
jvanverth | 9f37246 | 2016-04-06 06:08:59 -0700 | [diff] [blame] | 53 | 'dependencies': [ |
| 54 | 'flags.gyp:flags', |
| 55 | 'gputest.gyp:skgputest', |
| 56 | 'jsoncpp.gyp:jsoncpp', |
| 57 | 'skia_lib.gyp:skia_lib', |
| 58 | 'tools.gyp:crash_handler', |
| 59 | 'tools.gyp:proc_stats', |
| 60 | 'tools.gyp:resources', |
| 61 | 'tools.gyp:sk_tool_utils', |
| 62 | 'tools.gyp:timer', |
| 63 | 'tools.gyp:url_data_manager', |
| 64 | ], |
djsollen | 12d62a7 | 2016-04-21 07:59:44 -0700 | [diff] [blame] | 65 | 'conditions' : [ |
| 66 | [ 'skia_os == "android"', { |
| 67 | 'dependencies': [ |
| 68 | 'android_deps.gyp:Android_EntryPoint', |
| 69 | 'android_deps.gyp:native_app_glue', |
| 70 | ], |
jvanverth | c7027ab | 2016-06-16 09:52:35 -0700 | [diff] [blame] | 71 | # views depends on SkOSWindow_android, which we don't want to include |
| 72 | # so we only include the minimum set of views files in sources |
| 73 | 'dependencies!': [ |
| 74 | 'views.gyp:views', |
| 75 | ], |
djsollen | 12d62a7 | 2016-04-21 07:59:44 -0700 | [diff] [blame] | 76 | 'link_settings': { |
| 77 | 'libraries': [ |
| 78 | '-landroid', |
| 79 | ], |
| 80 | }, |
| 81 | }], |
jvanverth | 063ece7 | 2016-06-17 09:29:14 -0700 | [diff] [blame] | 82 | [ 'skia_os == "linux" and skia_vulkan == 1', { |
jvanverth | 1d15596 | 2016-05-23 13:13:36 -0700 | [diff] [blame] | 83 | 'link_settings': { |
| 84 | 'libraries': [ |
| 85 | '-lX11-xcb', |
| 86 | ], |
| 87 | }, |
| 88 | }], |
jvanverth | 1ba1d37 | 2016-08-04 12:30:31 -0700 | [diff] [blame] | 89 | [ 'skia_os == "mac"', { |
| 90 | 'dependencies': [ |
| 91 | 'sdl.gyp:sdl', |
| 92 | ], |
| 93 | }], |
djsollen | 12d62a7 | 2016-04-21 07:59:44 -0700 | [diff] [blame] | 94 | ['skia_os != "android"', { |
jvanverth | c7027ab | 2016-06-16 09:52:35 -0700 | [diff] [blame] | 95 | 'sources/': [ |
| 96 | ['exclude', '_android.(h|cpp)$'], |
| 97 | ['exclude', 'src/views'], |
djsollen | 12d62a7 | 2016-04-21 07:59:44 -0700 | [diff] [blame] | 98 | ], |
| 99 | }], |
jvanverth | 1d15596 | 2016-05-23 13:13:36 -0700 | [diff] [blame] | 100 | ['skia_os != "linux"', { |
jvanverth | c7027ab | 2016-06-16 09:52:35 -0700 | [diff] [blame] | 101 | 'sources/': [ |
jvanverth | 1d15596 | 2016-05-23 13:13:36 -0700 | [diff] [blame] | 102 | ['exclude', '_unix.(h|cpp)$'], |
| 103 | ['exclude', 'keysym2ucs.c'], |
| 104 | ], |
| 105 | }], |
djsollen | 12d62a7 | 2016-04-21 07:59:44 -0700 | [diff] [blame] | 106 | ['skia_os != "win"', { |
| 107 | 'sources/': [ ['exclude', '_win.(h|cpp)$'], |
| 108 | ], |
| 109 | }], |
jvanverth | a3f3cac | 2016-07-19 14:17:20 -0700 | [diff] [blame] | 110 | ['skia_os != "mac"', { |
| 111 | 'sources/': [ ['exclude', '_mac.(h|cpp)$'], |
| 112 | ], |
| 113 | }], |
jvanverth | 063ece7 | 2016-06-17 09:29:14 -0700 | [diff] [blame] | 114 | ['skia_vulkan == 0', { |
| 115 | 'sources/': [ ['exclude', 'Vulkan'] |
| 116 | ], |
| 117 | }], |
djsollen | 12d62a7 | 2016-04-21 07:59:44 -0700 | [diff] [blame] | 118 | ], |
jvanverth | 9f37246 | 2016-04-06 06:08:59 -0700 | [diff] [blame] | 119 | }, |
| 120 | ], |
| 121 | } |