blob: f1feb31fda37ea1424f829bdf2177f9947ba0bb3 [file] [log] [blame]
Saman Samif4d2a442019-05-21 15:04:41 -04001# 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
15import("../swiftshader.gni")
16
17swiftshader_source_set("WSI") {
18 sources = [
19 "VkSurfaceKHR.cpp",
20 "VkSurfaceKHR.hpp",
21 "VkSwapchainKHR.cpp",
22 "VkSwapchainKHR.hpp",
Saman Samif4d2a442019-05-21 15:04:41 -040023 ]
24
Alexis Hetuf9e9cf62019-06-05 17:18:40 -040025 if (is_linux) {
26 sources += [
Jamie Madillcebb9632019-09-09 11:28:19 -040027 "XcbSurfaceKHR.cpp",
28 "XcbSurfaceKHR.hpp",
Alexis Hetuf9e9cf62019-06-05 17:18:40 -040029 "XlibSurfaceKHR.cpp",
30 "XlibSurfaceKHR.hpp",
31 "libX11.cpp",
32 "libX11.hpp",
33 ]
34 }
35
Jamie Madillbbd8c422019-08-28 17:08:17 -040036 if (is_win) {
37 sources += [
38 "Win32SurfaceKHR.cpp",
39 "Win32SurfaceKHR.hpp",
40 ]
41 }
42
Jonah Ryan-Davis6623ca12019-10-25 10:44:05 -060043 if (is_mac) {
44 sources += [
Jonah Ryan-Davis215bc792019-10-31 17:23:49 -040045 "MetalSurface.mm",
46 "MetalSurface.h",
Jonah Ryan-Davis6623ca12019-10-25 10:44:05 -060047 ]
48 libs = [
49 "Cocoa.framework",
50 "QuartzCore.framework",
51 ]
52 }
53
Saman Samif4d2a442019-05-21 15:04:41 -040054 include_dirs = [
55 "..",
56 "../../include",
57 "../../third_party/SPIRV-Headers/include",
58 ]
Jamie Madillfe23c662019-08-30 17:38:24 -040059
60 deps = [
Ben Claytone693b622019-09-05 12:48:37 +010061 "../../third_party/marl:Marl_headers",
Ben Claytona8e4ecd2020-02-07 18:07:22 +000062 "../System",
Jamie Madillfe23c662019-08-30 17:38:24 -040063 "../Vulkan:swiftshader_libvulkan_headers",
64 ]
Jonah Ryan-Davis27a3d312019-11-06 12:56:52 -050065
66 configs = [ "../Vulkan:swiftshader_libvulkan_private_config", ]
Saman Samif4d2a442019-05-21 15:04:41 -040067}