IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QT_DEPLOY_PLUGINS_DIR

Prefix-relative subdirectory for deploying Qt plugins on some target platforms.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QT_DEPLOY_PLUGINS_DIR

Prefix-relative subdirectory for deploying Qt plugins on some target platforms.

This variable is defined by the script named by QT_DEPLOY_SUPPORT. It should only be used as part of deployment during installation or a post-build rule.

This variable was introduced in Qt 6.3.

This variable is in technology preview and may change in future releases.

Projects should use QT_DEPLOY_PLUGINS_DIR in their deploy scripts to avoid hard-coding a particular directory under which to deploy plugins.

QT_DEPLOY_PLUGINS_DIR defaults to the value plugins. To change the value of QT_DEPLOY_PLUGINS_DIR, set it in the project deployment script before QT_DEPLOY_SUPPORT is included.

The QT_DEPLOY_PLUGINS_DIR path is relative to QT_DEPLOY_PREFIX.

This variable is not meaningful when deploying into a macOS app bundle and should not be used for that scenario. Apple's macOS app bundle guidelines require all plugins to be deployed to the PlugIns subdirectory of the bundle contents.

Example

 
Sélectionnez
cmake_minimum_required(VERSION 3.16...3.22)
project(MyThings)

set(CMAKE_INSTALL_BINDIR "mybindir")
set(CMAKE_INSTALL_LIBDIR "mylibdir")

find_package(Qt6 REQUIRED COMPONENTS Core)
qt_standard_project_setup()

qt_add_executable(MyApp main.cpp)

set(deploy_script "${CMAKE_CURRENT_BINARY_DIR}/deploy_MyApp.cmake")
file(GENERATE OUTPUT ${deploy_script} CONTENT "

set(QT_DEPLOY_PLUGINS_DIR \"mypluginsdir\")
set(QT_DEPLOY_QML_DIR \"myqmldir\")

include(\"${QT_DEPLOY_SUPPORT}\")

qt_deploy_runtime_dependencies(
    EXECUTABLE \"\${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:MyApp>\"
)")

See Also

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+