Saman Sami | f4d2a44 | 2019-05-21 15:04:41 -0400 | [diff] [blame] | 1 | # Copyright 2019 The SwiftShader Authors. All Rights Reserved. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | import("../swiftshader.gni") |
| 16 | |
| 17 | swiftshader_source_set("WSI") { |
| 18 | sources = [ |
| 19 | "VkSurfaceKHR.cpp", |
| 20 | "VkSurfaceKHR.hpp", |
| 21 | "VkSwapchainKHR.cpp", |
| 22 | "VkSwapchainKHR.hpp", |
Saman Sami | f4d2a44 | 2019-05-21 15:04:41 -0400 | [diff] [blame] | 23 | ] |
| 24 | |
Alexis Hetu | f9e9cf6 | 2019-06-05 17:18:40 -0400 | [diff] [blame] | 25 | if (is_linux) { |
| 26 | sources += [ |
Jamie Madill | cebb963 | 2019-09-09 11:28:19 -0400 | [diff] [blame] | 27 | "XcbSurfaceKHR.cpp", |
| 28 | "XcbSurfaceKHR.hpp", |
Alexis Hetu | f9e9cf6 | 2019-06-05 17:18:40 -0400 | [diff] [blame] | 29 | "XlibSurfaceKHR.cpp", |
| 30 | "XlibSurfaceKHR.hpp", |
| 31 | "libX11.cpp", |
| 32 | "libX11.hpp", |
| 33 | ] |
| 34 | } |
| 35 | |
Jamie Madill | bbd8c42 | 2019-08-28 17:08:17 -0400 | [diff] [blame] | 36 | if (is_win) { |
| 37 | sources += [ |
| 38 | "Win32SurfaceKHR.cpp", |
| 39 | "Win32SurfaceKHR.hpp", |
| 40 | ] |
| 41 | } |
| 42 | |
Jonah Ryan-Davis | 6623ca1 | 2019-10-25 10:44:05 -0600 | [diff] [blame] | 43 | if (is_mac) { |
| 44 | sources += [ |
Jonah Ryan-Davis | 215bc79 | 2019-10-31 17:23:49 -0400 | [diff] [blame] | 45 | "MetalSurface.mm", |
| 46 | "MetalSurface.h", |
Jonah Ryan-Davis | 6623ca1 | 2019-10-25 10:44:05 -0600 | [diff] [blame] | 47 | ] |
| 48 | libs = [ |
| 49 | "Cocoa.framework", |
| 50 | "QuartzCore.framework", |
| 51 | ] |
| 52 | } |
| 53 | |
Saman Sami | f4d2a44 | 2019-05-21 15:04:41 -0400 | [diff] [blame] | 54 | include_dirs = [ |
| 55 | "..", |
| 56 | "../../include", |
| 57 | "../../third_party/SPIRV-Headers/include", |
| 58 | ] |
Jamie Madill | fe23c66 | 2019-08-30 17:38:24 -0400 | [diff] [blame] | 59 | |
| 60 | deps = [ |
Ben Clayton | e693b62 | 2019-09-05 12:48:37 +0100 | [diff] [blame] | 61 | "../../third_party/marl:Marl_headers", |
Ben Clayton | a8e4ecd | 2020-02-07 18:07:22 +0000 | [diff] [blame] | 62 | "../System", |
Jamie Madill | fe23c66 | 2019-08-30 17:38:24 -0400 | [diff] [blame] | 63 | "../Vulkan:swiftshader_libvulkan_headers", |
| 64 | ] |
Jonah Ryan-Davis | 27a3d31 | 2019-11-06 12:56:52 -0500 | [diff] [blame] | 65 | |
| 66 | configs = [ "../Vulkan:swiftshader_libvulkan_private_config", ] |
Saman Sami | f4d2a44 | 2019-05-21 15:04:41 -0400 | [diff] [blame] | 67 | } |