diff options
Diffstat (limited to 'examples/network/torrent/CMakeLists.txt')
-rw-r--r-- | examples/network/torrent/CMakeLists.txt | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/examples/network/torrent/CMakeLists.txt b/examples/network/torrent/CMakeLists.txt index 559d89633a..fbf974efef 100644 --- a/examples/network/torrent/CMakeLists.txt +++ b/examples/network/torrent/CMakeLists.txt @@ -1,20 +1,13 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + cmake_minimum_required(VERSION 3.16) project(torrent LANGUAGES CXX) -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/torrent") - find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(torrent addtorrentdialog.cpp addtorrentdialog.h addtorrentform.ui @@ -36,23 +29,24 @@ set_target_properties(torrent PROPERTIES MACOSX_BUNDLE TRUE ) -target_link_libraries(torrent PUBLIC - Qt::Core - Qt::Gui - Qt::Network - Qt::Widgets +target_link_libraries(torrent PRIVATE + Qt6::Core + Qt6::Gui + Qt6::Network + Qt6::Widgets ) # Resources: set(icons_resource_files - "icons/1downarrow.png" - "icons/1uparrow.png" - "icons/bottom.png" - "icons/exit.png" - "icons/peertopeer.png" - "icons/player_pause.png" - "icons/player_play.png" - "icons/player_stop.png" + "icons/1downarrow.svg" + "icons/1uparrow.svg" + "icons/bottom.svg" + "icons/exit.svg" + "icons/peertopeer.svg" + "icons/player_pause.svg" + "icons/player_play.svg" + "icons/player_stop.svg" + "icons/about.svg" ) qt_add_resources(torrent "icons" @@ -63,7 +57,14 @@ qt_add_resources(torrent "icons" ) install(TARGETS torrent - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION . + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +qt_generate_deploy_app_script( + TARGET torrent + OUTPUT_SCRIPT deploy_script + NO_UNSUPPORTED_PLATFORM_ERROR ) +install(SCRIPT ${deploy_script}) |