Antonio Maiorano | 9418b51 | 2020-04-08 23:18:13 -0400 | [diff] [blame] | 1 | # Copyright 2020 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 | set(ROOT_PROJECT_COMPILE_OPTIONS |
| 16 | ${SWIFTSHADER_COMPILE_OPTIONS} |
| 17 | ${WARNINGS_AS_ERRORS} |
| 18 | ) |
| 19 | |
| 20 | set(DEVICE_SRC_FILES |
| 21 | ASTC_Decoder.cpp |
| 22 | ASTC_Decoder.hpp |
| 23 | BC_Decoder.cpp |
| 24 | BC_Decoder.hpp |
| 25 | Blitter.cpp |
| 26 | Blitter.hpp |
| 27 | Clipper.cpp |
| 28 | Clipper.hpp |
| 29 | Config.hpp |
| 30 | Context.cpp |
| 31 | Context.hpp |
| 32 | ETC_Decoder.cpp |
| 33 | ETC_Decoder.hpp |
Antonio Maiorano | 9418b51 | 2020-04-08 23:18:13 -0400 | [diff] [blame] | 34 | Memset.hpp |
| 35 | PixelProcessor.cpp |
| 36 | PixelProcessor.hpp |
| 37 | Polygon.hpp |
| 38 | Primitive.hpp |
| 39 | QuadRasterizer.cpp |
| 40 | QuadRasterizer.hpp |
| 41 | Rasterizer.hpp |
| 42 | Renderer.cpp |
| 43 | Renderer.hpp |
| 44 | RoutineCache.hpp |
| 45 | Sampler.hpp |
| 46 | SetupProcessor.cpp |
| 47 | SetupProcessor.hpp |
| 48 | Stream.hpp |
| 49 | Triangle.hpp |
| 50 | Vertex.hpp |
| 51 | VertexProcessor.cpp |
| 52 | VertexProcessor.hpp |
| 53 | ) |
| 54 | |
| 55 | add_library(vk_device EXCLUDE_FROM_ALL |
| 56 | ${DEVICE_SRC_FILES} |
| 57 | ) |
| 58 | |
| 59 | set_target_properties(vk_device PROPERTIES |
| 60 | POSITION_INDEPENDENT_CODE 1 |
| 61 | FOLDER "SwiftShader VK" |
Antonio Maiorano | 9418b51 | 2020-04-08 23:18:13 -0400 | [diff] [blame] | 62 | ) |
| 63 | |
| 64 | target_include_directories(vk_device |
| 65 | PUBLIC |
| 66 | ".." |
Antonio Maiorano | 8772b42 | 2020-04-15 15:00:36 -0400 | [diff] [blame] | 67 | "${SWIFTSHADER_DIR}/include" |
Antonio Maiorano | 9418b51 | 2020-04-08 23:18:13 -0400 | [diff] [blame] | 68 | ) |
| 69 | |
| 70 | target_compile_options(vk_device |
Antonio Maiorano | 47d09cb | 2020-04-15 13:11:38 -0400 | [diff] [blame] | 71 | PRIVATE |
Antonio Maiorano | 9418b51 | 2020-04-08 23:18:13 -0400 | [diff] [blame] | 72 | ${ROOT_PROJECT_COMPILE_OPTIONS} |
| 73 | ) |
| 74 | |
Antonio Maiorano | 63aa954 | 2020-04-20 17:52:01 -0400 | [diff] [blame] | 75 | target_link_options(vk_device |
| 76 | PUBLIC |
| 77 | ${SWIFTSHADER_LINK_FLAGS} |
| 78 | ) |
| 79 | |
Antonio Maiorano | 9418b51 | 2020-04-08 23:18:13 -0400 | [diff] [blame] | 80 | target_link_libraries(vk_device |
| 81 | PUBLIC |
| 82 | vk_pipeline |
Antonio Maiorano | ceb6258 | 2020-04-21 13:25:10 -0400 | [diff] [blame] | 83 | $<$<BOOL:${SWIFTSHADER_ENABLE_ASTC}>:astc-encoder> |
Antonio Maiorano | 9418b51 | 2020-04-08 23:18:13 -0400 | [diff] [blame] | 84 | ) |