cmake how to set multi QML_IMPORT_PATH?it does not work.
-
6.9.3+vs2022 , here are the codes:
list(APPEND QML_IMPORT_PATHS ${CMAKE_BINARY_DIR}/TwoDEncoder/ ${CMAKE_BINARY_DIR}/QmlComponents/) list(REMOVE_DUPLICATES QML_IMPORT_PATHS) set(QML_IMPORT_PATH ${QML_IMPORT_PATHS} CACHE STRING "qml import path" FORCE) message("paths:" ${QML_IMPORT_PATHS})but the cache does not write two directory, and the editor always tells not found the module:

-
Put quotes around the list if you want to stringify it properly:
set(QML_IMPORT_PATH "${QML_IMPORT_PATHS}" CACHE STRING "qml import path" FORCE) -
Q QtTester has marked this topic as solved on