Bladeren bron

Change the installation directory of QML plugins

- To fully support the windows packaging installation paths of the
  qml plugins should be relative. Since windows currently only
  supports static build, no QML_IMPORT_PATH is required to have
  plugin linked and imported.
Alexey Edelev 3 jaren geleden
bovenliggende
commit
a9de300f03
2 gewijzigde bestanden met toevoegingen van 10 en 2 verwijderingen
  1. 5 1
      src/grpc/quick/CMakeLists.txt
  2. 5 1
      src/protobuf/quick/CMakeLists.txt

+ 5 - 1
src/grpc/quick/CMakeLists.txt

@@ -10,7 +10,11 @@ set(CMAKE_AUTORCC ON)
 
 qt_protobuf_extract_qt_variable(QT_INSTALL_QML)
 
-set(TARGET_IMPORTS_DIR ${QT_INSTALL_QML}/QtGrpc)
+if(NOT WIN32)
+    set(TARGET_IMPORTS_DIR ${QT_INSTALL_QML}/QtGrpc)
+else()
+    set(TARGET_IMPORTS_DIR ${CMAKE_INSTALL_LIBDIR}/qml/QtGrpc)
+endif()
 
 file(GLOB SOURCES
     qquickgrpcsubscription.cpp

+ 5 - 1
src/protobuf/quick/CMakeLists.txt

@@ -10,7 +10,11 @@ set(CMAKE_AUTORCC ON)
 
 qt_protobuf_extract_qt_variable(QT_INSTALL_QML)
 
-set(TARGET_IMPORTS_DIR ${QT_INSTALL_QML}/QtProtobuf)
+if(NOT WIN32)
+    set(TARGET_IMPORTS_DIR ${QT_INSTALL_QML}/QtProtobuf)
+else()
+    set(TARGET_IMPORTS_DIR ${CMAKE_INSTALL_LIBDIR}/qml/QtProtobuf)
+endif()
 
 file(GLOB SOURCES
     qtprotobufquickplugin.cpp)