summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews/fetchmore/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/itemviews/fetchmore/CMakeLists.txt')
-rw-r--r--examples/widgets/itemviews/fetchmore/CMakeLists.txt37
1 files changed, 24 insertions, 13 deletions
diff --git a/examples/widgets/itemviews/fetchmore/CMakeLists.txt b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
index d3f2578302..5013d5bab2 100644
--- a/examples/widgets/itemviews/fetchmore/CMakeLists.txt
+++ b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from fetchmore.pro.
-#####################################################################
-## fetchmore Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(fetchmore LANGUAGES CXX)
-add_qt_executable(fetchmore
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/fetchmore"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/fetchmore"
- SOURCES
- filelistmodel.cpp filelistmodel.h
- main.cpp
- window.cpp window.h
- LIBRARIES
- 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 Widgets)
+
+add_executable(fetchmore WIN32 MACOSX_BUNDLE
+ filelistmodel.cpp filelistmodel.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(fetchmore PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS fetchmore
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)