mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 16:55:25 +08:00
qt 6.5.1 original
This commit is contained in:
25
tests/auto/cmake/test_build_simple_widget_app/CMakeLists.txt
Normal file
25
tests/auto/cmake/test_build_simple_widget_app/CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(ios_projects LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Widgets)
|
||||
|
||||
function(create_target target)
|
||||
qt_add_executable(${target}
|
||||
main.cpp
|
||||
)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
)
|
||||
target_link_libraries(${target} PUBLIC
|
||||
Qt::Widgets
|
||||
)
|
||||
endfunction()
|
||||
|
||||
create_target(simple_widget_app)
|
||||
|
13
tests/auto/cmake/test_build_simple_widget_app/main.cpp
Normal file
13
tests/auto/cmake/test_build_simple_widget_app/main.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include <QApplication>
|
||||
#include <QWidget>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
QWidget widget;
|
||||
widget.show();
|
||||
return app.exec();
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
TEMPLATE = app
|
||||
SOURCES += main.cpp
|
||||
QT += widgets
|
||||
CONFIG += app_bundle
|
||||
TARGET = simple_widget_app
|
Reference in New Issue
Block a user