diff --git a/CMakeLists.txt b/CMakeLists.txt index 710fcc2e..9cc9fe28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/app/ui/CMakeLists.txt b/app/ui/CMakeLists.txt index 0fde0710..093596a0 100644 --- a/app/ui/CMakeLists.txt +++ b/app/ui/CMakeLists.txt @@ -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) diff --git a/app/ui/CustomComponents/CMakeLists.txt b/app/ui/CustomComponents/CMakeLists.txt index be28dad1..b345306d 100644 --- a/app/ui/CustomComponents/CMakeLists.txt +++ b/app/ui/CustomComponents/CMakeLists.txt @@ -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 diff --git a/app/ui/FileDialog/CMakeLists.txt b/app/ui/FileDialog/CMakeLists.txt index f16fc1ef..2b4e293f 100644 --- a/app/ui/FileDialog/CMakeLists.txt +++ b/app/ui/FileDialog/CMakeLists.txt @@ -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 diff --git a/app/ui/Style/CMakeLists.txt b/app/ui/Style/CMakeLists.txt index 76c632bb..a361343d 100644 --- a/app/ui/Style/CMakeLists.txt +++ b/app/ui/Style/CMakeLists.txt @@ -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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 37d60841..a2c7ba26 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index c7a8df24..a7e90e77 100755 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -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) diff --git a/src/filesystem/CMakeLists.txt b/src/filesystem/CMakeLists.txt index f1d04483..3fff5d4b 100755 --- a/src/filesystem/CMakeLists.txt +++ b/src/filesystem/CMakeLists.txt @@ -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 diff --git a/src/services/CMakeLists.txt b/src/services/CMakeLists.txt index 19311473..5189acf8 100755 --- a/src/services/CMakeLists.txt +++ b/src/services/CMakeLists.txt @@ -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