summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt')
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt35
1 files changed, 23 insertions, 12 deletions
diff --git a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
index 326df33ba2..7cce164bc6 100644
--- a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
+++ b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from combowidgetmapper.pro.
-#####################################################################
-## combowidgetmapper Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(combowidgetmapper LANGUAGES CXX)
-add_qt_executable(combowidgetmapper
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/combowidgetmapper"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/combowidgetmapper"
- SOURCES
- 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(combowidgetmapper WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(combowidgetmapper PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS combowidgetmapper
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)