| # 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(DAWN_WIRE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) |
| set(DAWN_WIRE_INCLUDE_DIR ${INCLUDE_DIR}/dawn_wire) |
| |
| Generate( |
| LIB_NAME dawn_wire_autogen |
| LIB_TYPE OBJECT |
| FOLDER "wire" |
| PRINT_NAME "dawn_wire autogenerated files" |
| COMMAND_LINE_ARGS |
| ${GENERATOR_COMMON_ARGS} |
| -T dawn_wire |
| ) |
| target_compile_definitions(dawn_wire_autogen PRIVATE DAWN_WIRE_IMPLEMENTATION) |
| |
| add_library(dawn_wire SHARED |
| $<TARGET_OBJECTS:dawn_wire_autogen> |
| ${DAWN_WIRE_DIR}/WireCmd.h |
| ${DAWN_WIRE_INCLUDE_DIR}/Wire.h |
| ${DAWN_WIRE_INCLUDE_DIR}/dawn_wire_export.h |
| ) |
| target_link_libraries(dawn_wire PRIVATE dawn_common) |
| target_compile_definitions(dawn_wire PRIVATE DAWN_WIRE_IMPLEMENTATION) |
| DawnInternalTarget("wire" dawn_wire) |