# Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause cmake_minimum_required(VERSION 3.16) project(hello_triangle LANGUAGES CXX) if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() find_package(Qt6 REQUIRED COMPONENTS Core Gui) qt_standard_project_setup() qt_add_executable(hello_triangle hello_triangle_minimal.cpp ) set_target_properties(hello_triangle PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) target_link_libraries(hello_triangle PRIVATE Qt6::Core Qt6::Gui ) install(TARGETS hello_triangle RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) target_compile_options(hello_triangle PRIVATE -sUSE_WEBGPU=1) target_link_options(hello_triangle PRIVATE -sUSE_WEBGPU=1)