From 7cec30a15f4712e782bb1011d2b93e6bf77cce6b Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 29 Jul 2020 08:43:00 +0200 Subject: Add cmake build Task-number: QTBUG-89091 Change-Id: Ie511e6bc262f197b2c21e52ec7696a0d50e06d18 Reviewed-by: Joerg Bornemann --- examples/charts/qmlchart/CMakeLists.txt | 69 +++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 examples/charts/qmlchart/CMakeLists.txt (limited to 'examples/charts/qmlchart') diff --git a/examples/charts/qmlchart/CMakeLists.txt b/examples/charts/qmlchart/CMakeLists.txt new file mode 100644 index 00000000..6496ca8b --- /dev/null +++ b/examples/charts/qmlchart/CMakeLists.txt @@ -0,0 +1,69 @@ +# Generated from qmlchart.pro. + +cmake_minimum_required(VERSION 3.14) +project(qmlchart LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/charts/qmlchart") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Charts) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +qt_add_executable(qmlchart + main.cpp +) +set_target_properties(qmlchart PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) +target_link_libraries(qmlchart PUBLIC + Qt::Charts + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + + +# Resources: +set(resources_resource_files + "qml/qmlchart/MainForm.ui.qml" + "qml/qmlchart/View1.qml" + "qml/qmlchart/View10.qml" + "qml/qmlchart/View11.qml" + "qml/qmlchart/View12.qml" + "qml/qmlchart/View2.qml" + "qml/qmlchart/View3.qml" + "qml/qmlchart/View4.qml" + "qml/qmlchart/View5.qml" + "qml/qmlchart/View6.qml" + "qml/qmlchart/View7.qml" + "qml/qmlchart/View8.qml" + "qml/qmlchart/View9.qml" + "qml/qmlchart/main.qml" +) + +qt6_add_resources(qmlchart "resources" + PREFIX + "/" + FILES + ${resources_resource_files} +) + +install(TARGETS qmlchart + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) -- cgit v1.2.3