CMakeLists: Generate Dawn headers separately from libdawn

libdawn will be one of the libraries produced but other libraries like
libdawn_native don't need to link against it. However they do need the
Dawn headers so we generate them separately.

This also makes all internal targets depend on the header generation and
have the include directories necessary for those headers.

Also has a small fix for setting compile flags only for C++ files.
This commit is contained in:
Corentin Wallez
2018-07-24 16:25:38 +02:00
committed by Corentin Wallez
parent deb5d33643
commit 6c27fd9c94
7 changed files with 58 additions and 46 deletions

View File

@@ -54,7 +54,7 @@ if (DAWN_ENABLE_VULKAN)
endif()
add_library(utils STATIC ${UTILS_SOURCES})
target_link_libraries(utils lib_dawn_native shaderc_shared dawncpp dawn)
target_link_libraries(utils libdawn_native shaderc_shared libdawn)
target_include_directories(utils PUBLIC ${SRC_DIR})
DawnInternalTarget("" utils)
if(NOT MSVC)