summaryrefslogtreecommitdiffstats
path: root/examples/qpa/windows/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qpa/windows/CMakeLists.txt')
-rw-r--r--examples/qpa/windows/CMakeLists.txt42
1 files changed, 28 insertions, 14 deletions
diff --git a/examples/qpa/windows/CMakeLists.txt b/examples/qpa/windows/CMakeLists.txt
index 55135e02ff..2bd7b6fd85 100644
--- a/examples/qpa/windows/CMakeLists.txt
+++ b/examples/qpa/windows/CMakeLists.txt
@@ -1,19 +1,33 @@
# Generated from windows.pro.
-#####################################################################
-## windows Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(windows LANGUAGES CXX)
-add_qt_executable(windows
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qpa/windows"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qpa/windows"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::GuiPrivate
- Qt::CorePrivate
+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 Gui)
+find_package(Qt5 COMPONENTS Core)
+
+add_executable(windows
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(windows PRIVATE
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
+target_link_libraries(windows PUBLIC
+ Qt::Core
+ Qt::Gui
)
-#### Keys ignored in scope 1:.:windows.pro:<NONE>:
-# CONFIG = "console"
+install(TARGETS windows
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)