summaryrefslogtreecommitdiffstats
path: root/examples/demos/photoviewer
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-01-20 17:19:52 +0100
committerKai Köhne <kai.koehne@qt.io>2022-01-20 18:05:52 +0100
commit3dae1461ac3c6fed4303a5bf475c72d573d8c7c6 (patch)
treea2682e471984dbc79ca7f90854085e23f7164f63 /examples/demos/photoviewer
parenta06c9e74fd545bb8b0b74ef59b1eb51d787d7727 (diff)
Examples: Improve CMakeLists.txt files
Pick-to: 6.2 6.3 Change-Id: I7582f6c1b9daacaf694355269663b1d6616e0c05 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/demos/photoviewer')
-rw-r--r--examples/demos/photoviewer/CMakeLists.txt12
1 files changed, 3 insertions, 9 deletions
diff --git a/examples/demos/photoviewer/CMakeLists.txt b/examples/demos/photoviewer/CMakeLists.txt
index 8c10d30c8..0bc5f670d 100644
--- a/examples/demos/photoviewer/CMakeLists.txt
+++ b/examples/demos/photoviewer/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Generated from photoviewer.pro.
-
cmake_minimum_required(VERSION 3.16)
project(photoviewer LANGUAGES CXX)
@@ -9,20 +7,17 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/demos/photoviewer")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS QmlXmlListModel)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml QmlXmlListModel Quick)
qt_add_executable(photoviewer
main.cpp
)
+
set_target_properties(photoviewer PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
@@ -36,7 +31,6 @@ target_link_libraries(photoviewer PUBLIC
Qt::QmlXmlListModel
)
-
# Resources:
set(qmake_immediate_resource_files
"PhotoViewerCore/AlbumDelegate.qml"