mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-10 15:15:58 +00:00
Headers only INTERFACE library with generated headers don't work in CMake because the GENERATED property is local to a directory. Instead we make a STATIC library with a Dummy cpp file. INTERFACE libraries can only have INTERFACE sources so the sources get added to the dependant's list of sources. If these dependents are in another directory, they don't see the GENERATED property and fail to configure because the file doesn't exist on disk. Use this trick for both dawn_headers and dawncpp_headers that are header only libraries with generated headers. Bug: dawn:333 Change-Id: Ib0d6dcc5f351a638d1c5360214c0ce14a28fee3e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15921 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>