--- a/src/CMakeLists.txt	2024-05-12 11:05:21.807798096 +0200
+++ b/src/CMakeLists.txt	2024-05-12 11:08:47.625736216 +0200
@@ -51,10 +51,14 @@
 endif()
 
 # execute the command "qmake -query QT_INSTALL_PLUGINS" to get the path of plugins dir.
-execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PLUGINS
-    OUTPUT_VARIABLE QT_PLUGINS_DIR
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-)
+if (NOT QT_PLUGIN_INSTALL_PATH)
+	execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PLUGINS
+    	OUTPUT_VARIABLE QT_PLUGINS_DIR
+    	OUTPUT_STRIP_TRAILING_WHITESPACE)
+else ()
+	set(QT_PLUGINS_DIR ${QT_PLUGIN_INSTALL_PATH})
+endif()
+
 if(QT_PLUGINS_DIR)
     message(STATUS "Qt6 plugin directory:" "${QT_PLUGINS_DIR}")
 else()

