summaryrefslogtreecommitdiffstats
path: root/examples/widgets/touch/dials/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/touch/dials/CMakeLists.txt')
-rw-r--r--examples/widgets/touch/dials/CMakeLists.txt37
1 files changed, 23 insertions, 14 deletions
diff --git a/examples/widgets/touch/dials/CMakeLists.txt b/examples/widgets/touch/dials/CMakeLists.txt
index 76920b0f3c..0589e555f3 100644
--- a/examples/widgets/touch/dials/CMakeLists.txt
+++ b/examples/widgets/touch/dials/CMakeLists.txt
@@ -1,18 +1,27 @@
# Generated from dials.pro.
-#####################################################################
-## dials Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(dials LANGUAGES CXX)
-add_qt_executable(dials
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/dials"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/dials"
- SOURCES
- dials.ui
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+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(dials WIN32 MACOSX_BUNDLE
+ dials.ui
+ main.cpp
+)
+target_link_libraries(dials PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS dials
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)