Skip to content

Commit 45fbc2c

Browse files
committed
Add QML import paths for app classes
1 parent 9abb1f8 commit 45fbc2c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/app/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ qt_add_qml_module(${APP_TARGET}
1414
QML_FILES main.qml
1515
)
1616

17+
set(QML_IMPORT_PATH "${QML_IMPORT_PATH};${CMAKE_CURRENT_LIST_DIR}"
18+
CACHE STRING "Qt Creator extra QML import paths"
19+
FORCE
20+
)
21+
22+
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
23+
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
24+
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "" FORCE)
25+
1726
set_target_properties(${APP_TARGET} PROPERTIES
1827
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
1928
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}

0 commit comments

Comments
 (0)