tint->dawn Add src/dawn/CMakeLists.txt
Promote up some build rules from the root CMakeLists.txt file that are specific to Dawn. Bug: dawn:1275 Change-Id: I11e9261ac595f6d71742b20d54dc658a5fa7e996 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79105 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
c6ccd539e8
commit
7b77855a87
|
@ -213,37 +213,13 @@ set(CMAKE_CXX_STANDARD "17")
|
||||||
add_subdirectory(third_party)
|
add_subdirectory(third_party)
|
||||||
add_subdirectory(generator)
|
add_subdirectory(generator)
|
||||||
add_subdirectory(src/dawn)
|
add_subdirectory(src/dawn)
|
||||||
add_subdirectory(src/dawn/common)
|
|
||||||
add_subdirectory(src/dawn/platform)
|
################################################################################
|
||||||
add_subdirectory(src/dawn/native)
|
# Samples
|
||||||
add_subdirectory(src/dawn/wire)
|
################################################################################
|
||||||
# TODO(dawn:269): Remove once the implementation-based swapchains are removed.
|
|
||||||
add_subdirectory(src/dawn/utils)
|
|
||||||
|
|
||||||
if (DAWN_BUILD_SAMPLES)
|
if (DAWN_BUILD_SAMPLES)
|
||||||
#TODO(dawn:269): Add this once implementation-based swapchains are removed.
|
#TODO(dawn:269): Add this once implementation-based swapchains are removed.
|
||||||
#add_subdirectory(src/dawn/utils)
|
#add_subdirectory(src/utils)
|
||||||
add_subdirectory(samples/dawn)
|
add_subdirectory(samples/dawn)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DAWN_BUILD_NODE_BINDINGS)
|
|
||||||
set(NODE_BINDING_DEPS
|
|
||||||
${NODE_ADDON_API_DIR}
|
|
||||||
${NODE_API_HEADERS_DIR}
|
|
||||||
${WEBGPU_IDL_PATH}
|
|
||||||
)
|
|
||||||
foreach(DEP ${NODE_BINDING_DEPS})
|
|
||||||
if (NOT EXISTS ${DEP})
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"DAWN_BUILD_NODE_BINDINGS requires missing dependency '${DEP}'\n"
|
|
||||||
"Please follow the 'Fetch dependencies' instructions at:\n"
|
|
||||||
"./src/dawn/node/README.md"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
if (NOT CMAKE_POSITION_INDEPENDENT_CODE)
|
|
||||||
message(FATAL_ERROR "DAWN_BUILD_NODE_BINDINGS requires building with DAWN_ENABLE_PIC")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(src/dawn/node)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -12,6 +12,39 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Dawn projects
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
add_subdirectory(common)
|
||||||
|
add_subdirectory(platform)
|
||||||
|
add_subdirectory(native)
|
||||||
|
add_subdirectory(wire)
|
||||||
|
# TODO(dawn:269): Remove once the implementation-based swapchains are removed.
|
||||||
|
add_subdirectory(utils)
|
||||||
|
|
||||||
|
if (DAWN_BUILD_NODE_BINDINGS)
|
||||||
|
set(NODE_BINDING_DEPS
|
||||||
|
${NODE_ADDON_API_DIR}
|
||||||
|
${NODE_API_HEADERS_DIR}
|
||||||
|
${WEBGPU_IDL_PATH}
|
||||||
|
)
|
||||||
|
foreach(DEP ${NODE_BINDING_DEPS})
|
||||||
|
if (NOT EXISTS ${DEP})
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"DAWN_BUILD_NODE_BINDINGS requires missing dependency '${DEP}'\n"
|
||||||
|
"Please follow the 'Fetch dependencies' instructions at:\n"
|
||||||
|
"./src/dawn/node/README.md"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
if (NOT CMAKE_POSITION_INDEPENDENT_CODE)
|
||||||
|
message(FATAL_ERROR "DAWN_BUILD_NODE_BINDINGS requires building with DAWN_ENABLE_PIC")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(node)
|
||||||
|
endif()
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Dawn headers
|
# Dawn headers
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
Loading…
Reference in New Issue