From 4776e2c097efa459790cc3bbb3a125771e16134e Mon Sep 17 00:00:00 2001 From: sguionni Date: Wed, 29 May 2024 02:21:02 +0200 Subject: [PATCH] Clean --- lib/tool/CMakeLists.txt | 11 ++++------- lib/ui/cmake/library.cmake | 11 ++++------- lib/ui/src/ui/qt/application_qt.cpp | 3 --- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/lib/tool/CMakeLists.txt b/lib/tool/CMakeLists.txt index 767ad29ba..5316ff6e8 100644 --- a/lib/tool/CMakeLists.txt +++ b/lib/tool/CMakeLists.txt @@ -13,19 +13,16 @@ configure_qt() add_library(vtx_tool) configure_target(vtx_tool) +set(QT_RESOURCES_PATH asset/qt/resources) + file(GLOB_RECURSE HEADERS include/*) file(GLOB_RECURSE SOURCES src/*) -file(GLOB_RECURSE QT_RESOURCES asset/qt/resources/*) +file(GLOB_RECURSE QT_RESOURCES ${QT_RESOURCES_PATH}/*) target_sources(vtx_tool PRIVATE ${SOURCES} PUBLIC FILE_SET public_headers TYPE HEADERS BASE_DIRS include FILES ${HEADERS}) -qt_add_resources( - vtx_tool - vtx_qt_resources_tool - BASE asset/qt/resources/ - FILES ${QT_RESOURCES} -) +qt_add_resources(vtx_tool vtx_qt_resources_tool BASE ${QT_RESOURCES_PATH} FILES ${QT_RESOURCES}) target_link_libraries(vtx_tool PRIVATE vtx_util::vtx_util) target_link_libraries(vtx_tool PRIVATE vtx_app::vtx_app) diff --git a/lib/ui/cmake/library.cmake b/lib/ui/cmake/library.cmake index ad18e2f40..93d077076 100644 --- a/lib/ui/cmake/library.cmake +++ b/lib/ui/cmake/library.cmake @@ -9,19 +9,16 @@ find_package(Qt6 COMPONENTS Gui REQUIRED) find_package(Qt6 COMPONENTS Widgets REQUIRED) find_package(Qt6 COMPONENTS OpenGLWidgets REQUIRED) +set(QT_RESOURCES_PATH ${CMAKE_CURRENT_LIST_DIR}/../asset/qt/resources) + file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_LIST_DIR}/../include/*) file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_LIST_DIR}/../src/*) -file(GLOB_RECURSE QT_RESOURCES ${CMAKE_CURRENT_LIST_DIR}/../asset/qt/resources/*) +file(GLOB_RECURSE QT_RESOURCES ${QT_RESOURCES_PATH}/*) target_sources(vtx_ui PRIVATE ${SOURCES} PUBLIC FILE_SET public_headers TYPE HEADERS BASE_DIRS ${CMAKE_CURRENT_LIST_DIR}/../include FILES ${HEADERS}) -qt_add_resources( - vtx_ui - vtx_qt_resources_ui - BASE ${CMAKE_CURRENT_LIST_DIR}/../asset/qt/resources/ - FILES ${QT_RESOURCES} -) +qt_add_resources(vtx_ui vtx_qt_resources_ui BASE ${QT_RESOURCES_PATH} FILES ${QT_RESOURCES}) if (NOT DEFINED _VTX_UI_CONAN) target_link_libraries(vtx_ui PUBLIC vtx_util) diff --git a/lib/ui/src/ui/qt/application_qt.cpp b/lib/ui/src/ui/qt/application_qt.cpp index 757a352f6..95a0efd07 100644 --- a/lib/ui/src/ui/qt/application_qt.cpp +++ b/lib/ui/src/ui/qt/application_qt.cpp @@ -23,9 +23,6 @@ namespace VTX::UI::QT // Setup some Qt static configuration. QCoreApplication::setAttribute( Qt::AA_UseDesktopOpenGL ); QCoreApplication::setAttribute( Qt::AA_DontCheckOpenGLContextThreadAffinity ); - - // Init resources - // Q_INIT_RESOURCE( resources_ui ); } int ZERO = 0;