From b938edcfb3aa2c78e35c9d63d995f6824e14eadf Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Thu, 22 Aug 2019 11:45:45 +0200 Subject: Convert Examples This patch converts all examples in qtdeclarative except for a few exceptions which require a public facing qml plugin api. Change-Id: I2cd2b1bb455be8b48796893a8235dea7f8b35aa2 Reviewed-by: Alexandru Croitor --- examples/qml/shell/CMakeLists.txt | 41 ++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'examples/qml/shell/CMakeLists.txt') diff --git a/examples/qml/shell/CMakeLists.txt b/examples/qml/shell/CMakeLists.txt index 2b3bdd4786..0c376e323a 100644 --- a/examples/qml/shell/CMakeLists.txt +++ b/examples/qml/shell/CMakeLists.txt @@ -1,24 +1,29 @@ # Generated from shell.pro. -##################################################################### -## shell Binary: -##################################################################### +cmake_minimum_required(VERSION 3.14) +project(shell LANGUAGES CXX) -add_qt_executable(shell - GUI - OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qml/shell" - INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qml/shell" - SOURCES - main.cpp - PUBLIC_LIBRARIES - Qt::Qml -) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") -## Scopes: -##################################################################### +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Qml) -#### Keys ignored in scope 2:.:.:shell.pro:WIN32: -# CONFIG = "console" +add_qt_gui_executable(shell + main.cpp +) +target_link_libraries(shell PUBLIC + Qt::Core + Qt::Qml +) -#### Keys ignored in scope 3:.:.:shell.pro:APPLE_OSX: -# CONFIG = "-app_bundle" +install(TARGETS shell + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) -- cgit v1.2.3