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