From db58e8442483663b3d443b08a40ac6a3874480b1 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 29 Mar 2024 09:32:50 +0400 Subject: [PATCH] Allow to override Qt plugin directory The qtpaths-based deduction code doesn't really work for all systems, notably NixOS. Fixes #9 --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6b608c..719aa8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,8 +50,10 @@ if(Qt6LinguistTools_FOUND) endif() endif() -#execute_process(COMMAND ${QT_QTPATHS_EXECUTABLE} -query QT_INSTALL_PLUGINS OUTPUT_VARIABLE PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE) -execute_process(COMMAND ${QT_QTPATHS_EXECUTABLE} --plugin-dir OUTPUT_VARIABLE PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE) +if(NOT PLUGINDIR) + #execute_process(COMMAND ${QT_QTPATHS_EXECUTABLE} -query QT_INSTALL_PLUGINS OUTPUT_VARIABLE PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${QT_QTPATHS_EXECUTABLE} --plugin-dir OUTPUT_VARIABLE PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() if(PLUGINDIR) message(STATUS "Plugin path: ${PLUGINDIR}")