diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-10-26 17:09:47 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-10-26 23:38:39 +0100 |
commit | 20d5e2d7efd458671e2830e94cd8bc30e14361e5 (patch) | |
tree | b0cfe10bb101ee56eb1c2c4d0750fc33819aa324 /examples/qmltest | |
parent | 880b937b6c67df35eea46cec9f4580dc79e21a99 (diff) |
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 <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/qmltest')
-rw-r--r-- | examples/qmltest/qmltest/.prev_CMakeLists.txt | 10 | ||||
-rw-r--r-- | examples/qmltest/qmltest/CMakeLists.txt | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/examples/qmltest/qmltest/.prev_CMakeLists.txt b/examples/qmltest/qmltest/.prev_CMakeLists.txt index 364e661910..c50eb7bcd3 100644 --- a/examples/qmltest/qmltest/.prev_CMakeLists.txt +++ b/examples/qmltest/qmltest/.prev_CMakeLists.txt @@ -21,6 +21,10 @@ find_package(Qt6 COMPONENTS Gui) qt_add_executable(tst_qmltestexample tst_qmltest.cpp ) +set_target_properties(tst_qmltestexample PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(tst_qmltestexample PUBLIC Qt::Core Qt::Gui @@ -33,6 +37,12 @@ if(QT_BUILDING_QT) ) endif() +if(MACOS AND QT_BUILDING_QT) + set_target_properties(tst_qmltestexample PROPERTIES + MACOSX_BUNDLE FALSE + ) +endif() + install(TARGETS tst_qmltestexample RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/qmltest/qmltest/CMakeLists.txt b/examples/qmltest/qmltest/CMakeLists.txt index 113b31bfa5..c8a8361578 100644 --- a/examples/qmltest/qmltest/CMakeLists.txt +++ b/examples/qmltest/qmltest/CMakeLists.txt @@ -24,6 +24,10 @@ find_package(Qt6 COMPONENTS QuickTest) qt_add_executable(tst_qmltestexample tst_qmltest.cpp ) +set_target_properties(tst_qmltestexample PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) target_link_libraries(tst_qmltestexample PUBLIC Qt::Core Qt::Gui @@ -42,6 +46,12 @@ target_link_libraries(tst_qmltestexample PUBLIC #endif() # special case end +if(MACOS AND QT_BUILDING_QT) + set_target_properties(tst_qmltestexample PROPERTIES + MACOSX_BUNDLE FALSE + ) +endif() + install(TARGETS tst_qmltestexample RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" |