| # Copyright 2017 The Dawn Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| set(WIRE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) |
| set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests) |
| |
| Generate( |
| LIB_NAME wire_autogen |
| LIB_TYPE STATIC |
| FOLDER "wire" |
| PRINT_NAME "Wire serialization/deserialization autogenerated files" |
| EXTRA_DEPS dawn |
| COMMAND_LINE_ARGS |
| ${GENERATOR_COMMON_ARGS} |
| -T wire |
| EXTRA_SOURCES |
| ${WIRE_DIR}/WireCmd.h |
| ) |
| target_include_directories(wire_autogen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) |
| target_include_directories(wire_autogen PUBLIC ${GENERATED_DIR}) |
| target_link_libraries(wire_autogen dawn dawn_common) |
| |
| add_library(dawn_wire STATIC |
| ${WIRE_DIR}/TerribleCommandBuffer.cpp |
| ${WIRE_DIR}/TerribleCommandBuffer.h |
| ${WIRE_DIR}/Wire.h |
| ) |
| target_link_libraries(dawn_wire wire_autogen) |
| DawnInternalTarget("wire" dawn_wire) |