Skip to content

Commit

Permalink
Fixed qml import path mess
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilInTheGaps committed Nov 13, 2023
1 parent 72cf9d9 commit 617e662
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 51 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ if (WIN32)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CGET_PREFIX}/lib ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE})
endif()

# set QML import path
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/src)
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/app/ui)
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/qml-icon-fonts)
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator extra qml import paths" FORCE)

add_subdirectory(src)
add_subdirectory(app)
add_subdirectory(tests)
Expand Down
9 changes: 0 additions & 9 deletions app/ui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
cmake_minimum_required(VERSION 3.19)

list(APPEND QML_IMPORT_PATH ${CMAKE_BINARY_DIR}/thirdparty/qml-icon-fonts)
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/qml)
list(APPEND QML_IMPORT_PATH ${CMAKE_BINARY_DIR}/imports)
list(APPEND QML_IMPORT_PATH ${CMAKE_BINARY_DIR})
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator extra qml import paths" FORCE)

add_subdirectory(Style)
add_subdirectory(CustomComponents)
add_subdirectory(FileDialog)
Expand Down
6 changes: 0 additions & 6 deletions app/ui/CustomComponents/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
cmake_minimum_required(VERSION 3.19)

# set QML import path
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../)
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator extra qml import paths" FORCE)

qt_add_library(gm-companion-ui-cc STATIC)

set_source_files_properties(CCColors.qml PROPERTIES
Expand Down
6 changes: 0 additions & 6 deletions app/ui/FileDialog/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
cmake_minimum_required(VERSION 3.19)

# set QML import path
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../)
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator extra qml import paths" FORCE)

qt_add_qml_module(gm-companion-ui-filedialog
STATIC
URI FileDialog
Expand Down
6 changes: 0 additions & 6 deletions app/ui/Style/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
cmake_minimum_required(VERSION 3.19)

# set QML import path
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../)
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator extra qml import paths" FORCE)

qt_add_library(gm-companion-ui-style STATIC)

set_source_files_properties(StyleColors.qml PROPERTIES
Expand Down
6 changes: 0 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
cmake_minimum_required(VERSION 3.19)

# set QML import path
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../)
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator extra qml import paths" FORCE)

add_subdirectory(common)
add_subdirectory(services)
add_subdirectory(filesystem)
Expand Down
6 changes: 0 additions & 6 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
cmake_minimum_required(VERSION 3.19)

# set QML import path
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../)
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator extra qml import paths" FORCE)

# configure markdown lib
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/utils/markdownutils.h.in
${CMAKE_CURRENT_SOURCE_DIR}/utils/markdownutils.h @ONLY)
Expand Down
6 changes: 0 additions & 6 deletions src/filesystem/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
cmake_minimum_required(VERSION 3.19)

# set QML import path
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../)
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator extra qml import paths" FORCE)

set(SRC_COMMON
file.h
file.cpp
Expand Down
6 changes: 0 additions & 6 deletions src/services/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
cmake_minimum_required(VERSION 3.19)

# set QML import path
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND QML_IMPORT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../)
list(REMOVE_DUPLICATES QML_IMPORT_PATH)
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE STRING "Qt Creator extra qml import paths" FORCE)

set(SRC_COMMON
service.h
service.cpp
Expand Down

0 comments on commit 617e662

Please sign in to comment.