Skip to content

Commit 8f5c6b3

Browse files
committed
Move main.qml to qml subdir
1 parent 9075efb commit 8f5c6b3

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

src/app/CMakeLists.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,7 @@ qt_add_executable(${APP_TARGET}
88
appmenubar.h
99
)
1010

11-
qt_add_qml_module(${APP_TARGET}
12-
URI ScratchCPP
13-
VERSION 1.0
14-
QML_FILES main.qml
15-
)
16-
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)
11+
add_subdirectory(qml)
2512

2613
set_target_properties(${APP_TARGET} PROPERTIES
2714
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com

src/app/qml/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
qt_add_qml_module(${APP_TARGET}
2+
URI ScratchCPP
3+
VERSION 1.0
4+
QML_FILES main.qml
5+
)
6+
7+
set(QML_IMPORT_PATH "${QML_IMPORT_PATH};${CMAKE_CURRENT_LIST_DIR}"
8+
CACHE STRING "Qt Creator extra QML import paths"
9+
FORCE
10+
)
11+
12+
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
13+
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
14+
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "" FORCE)
File renamed without changes.

0 commit comments

Comments
 (0)