summaryrefslogtreecommitdiffstats
path: root/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt')
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt42
1 files changed, 22 insertions, 20 deletions
diff --git a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
index 5a20bbdb2e..750352e325 100644
--- a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
@@ -1,25 +1,27 @@
# Generated from weatheranchorlayout.pro.
-#####################################################################
-## weatheranchorlayout Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(weatheranchorlayout LANGUAGES CXX)
-add_qt_executable(weatheranchorlayout
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/weatheranchorlayout"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/weatheranchorlayout"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(weatheranchorlayout "weatheranchorlayout" FILES
- images/5days.jpg
- images/details.jpg
- images/place.jpg
- images/tabbar.jpg
- images/title.jpg
- images/weather-few-clouds.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(weatheranchorlayout WIN32 MACOSX_BUNDLE
+ main.cpp
+ weatheranchorlayout.qrc
+)
+target_link_libraries(weatheranchorlayout PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS weatheranchorlayout
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)