summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/tools/treemodelcompleter/CMakeLists.txt')
-rw-r--r--examples/widgets/tools/treemodelcompleter/CMakeLists.txt40
1 files changed, 23 insertions, 17 deletions
diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
index ab4d60f290..a6bd7177f1 100644
--- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
@@ -1,22 +1,28 @@
# Generated from treemodelcompleter.pro.
-#####################################################################
-## treemodelcompleter Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(treemodelcompleter LANGUAGES CXX)
-add_qt_executable(treemodelcompleter
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- treemodelcompleter.cpp treemodelcompleter.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(treemodelcompleter "treemodelcompleter" PREFIX "/" FILES
- resources/treemodel.txt)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(treemodelcompleter WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ treemodelcompleter.cpp treemodelcompleter.h treemodelcompleter.qrc
+)
+target_link_libraries(treemodelcompleter PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS treemodelcompleter
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)