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 15import("../swiftshader.gni") 16 17swiftshader_source_set("WSI") { 18 sources = [ 19 "VkSurfaceKHR.cpp", 20 "VkSurfaceKHR.hpp", 21 "VkSwapchainKHR.cpp", 22 "VkSwapchainKHR.hpp", 23 ] 24 25 if (is_linux) { 26 sources += [ 27 "XcbSurfaceKHR.cpp", 28 "XcbSurfaceKHR.hpp", 29 "XlibSurfaceKHR.cpp", 30 "XlibSurfaceKHR.hpp", 31 "libX11.cpp", 32 "libX11.hpp", 33 ] 34 } 35 36 if (is_win) { 37 sources += [ 38 "Win32SurfaceKHR.cpp", 39 "Win32SurfaceKHR.hpp", 40 ] 41 } 42 43 if (is_mac) { 44 sources += [ 45 "MetalSurface.mm", 46 "MetalSurface.h", 47 ] 48 libs = [ 49 "Cocoa.framework", 50 "QuartzCore.framework", 51 ] 52 } 53 54 include_dirs = [ 55 "..", 56 "../../include", 57 "../../third_party/SPIRV-Headers/include", 58 ] 59 60 deps = [ 61 "../../third_party/marl:Marl_headers", 62 "../System", 63 "../Vulkan:swiftshader_libvulkan_headers", 64 ] 65 66 configs = [ "../Vulkan:swiftshader_libvulkan_private_config", ] 67} 68