From 20d5e2d7efd458671e2830e94cd8bc30e14361e5 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 26 Oct 2020 17:09:47 +0100 Subject: CMake: Regenerate examples to set the WIN32_EXECUTABLE property As well as the MACOSX_BUNDLE properties as necessary. Task-number: QTBUG-87664 Task-number: QTBUG-86827 Change-Id: I46769fb543acb2cbeba122470b5e44ad478fbe4e Reviewed-by: Joerg Bornemann --- examples/qml/shell/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'examples/qml/shell') diff --git a/examples/qml/shell/CMakeLists.txt b/examples/qml/shell/CMakeLists.txt index 5f646ac46e..6c986b7778 100644 --- a/examples/qml/shell/CMakeLists.txt +++ b/examples/qml/shell/CMakeLists.txt @@ -21,11 +21,27 @@ find_package(Qt6 COMPONENTS Qml) qt_add_executable(shell main.cpp ) +set_target_properties(shell PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(shell PUBLIC Qt::Core Qt::Qml ) +if(WIN32) + set_target_properties(shell PROPERTIES + WIN32_EXECUTABLE FALSE + ) +endif() + +if(APPLE) + set_target_properties(shell PROPERTIES + MACOSX_BUNDLE FALSE + ) +endif() + install(TARGETS shell RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" -- cgit v1.2.3