summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews/storageview/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/itemviews/storageview/CMakeLists.txt')
-rw-r--r--examples/widgets/itemviews/storageview/CMakeLists.txt41
1 files changed, 26 insertions, 15 deletions
diff --git a/examples/widgets/itemviews/storageview/CMakeLists.txt b/examples/widgets/itemviews/storageview/CMakeLists.txt
index efad83e1a1..d25d839347 100644
--- a/examples/widgets/itemviews/storageview/CMakeLists.txt
+++ b/examples/widgets/itemviews/storageview/CMakeLists.txt
@@ -1,20 +1,31 @@
# Generated from storageview.pro.
-#####################################################################
-## storageview Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(storageview LANGUAGES CXX)
-add_qt_executable(storageview
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/storageview"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/storageview"
- SOURCES
- main.cpp
- storagemodel.cpp storagemodel.h
- LIBRARIES
- Qt::Gui
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
+find_package(Qt5 COMPONENTS Gui)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(storageview WIN32 MACOSX_BUNDLE
+ main.cpp
+ storagemodel.cpp storagemodel.h
+)
+target_link_libraries(storageview PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:storageview.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS storageview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)