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