diff options
author | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2020-12-18 12:03:26 +0100 |
---|---|---|
committer | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2021-01-07 12:33:24 +0100 |
commit | 6af3204a9b4352909489200f619198c6f3e9540f (patch) | |
tree | f9a54f646c05bc1c852881006c5c35131af0a86c /examples/treeview/customdelegate | |
parent | 7739d330d46fd26948a1158a0f33077c82d0912e (diff) |
Add CMake port based on the qmake setup
Change-Id: I47e7972bd2853608239a831586ba304573a7aef5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'examples/treeview/customdelegate')
-rw-r--r-- | examples/treeview/customdelegate/CMakeLists.txt | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/examples/treeview/customdelegate/CMakeLists.txt b/examples/treeview/customdelegate/CMakeLists.txt new file mode 100644 index 0000000..4604e63 --- /dev/null +++ b/examples/treeview/customdelegate/CMakeLists.txt @@ -0,0 +1,62 @@ +# Generated from customdelegate.pro. + +cmake_minimum_required(VERSION 3.14) +project(customdelegate 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}/treeview/customdelegate") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS QuickControls2) + +qt_add_executable(customdelegate + main.cpp +) +set_target_properties(customdelegate PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) +target_link_libraries(customdelegate PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick + Qt::QuickControls2 + Qt::Widgets +) + + +# Resources: +set(qmake_immediate_resource_files + "CustomTreeView.qml" + "file.png" + "folderclosed.png" + "folderopen.png" + "main.qml" +) + +qt6_add_resources(customdelegate "qmake_immediate" + PREFIX + "/" + FILES + ${qmake_immediate_resource_files} +) + +install(TARGETS customdelegate + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |