From 2e041073fccae6144d7d364d8ba9b30459575aec Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Tue, 19 Dec 2023 15:21:08 +0400 Subject: [PATCH 1/2] Move *.ui files for different applications to different folders --- apps/launcher/CMakeLists.txt | 14 +++++++------- {files => apps/launcher}/ui/datafilespage.ui | 0 {files => apps/launcher}/ui/directorypicker.ui | 0 {files => apps/launcher}/ui/graphicspage.ui | 0 {files => apps/launcher}/ui/importpage.ui | 0 {files => apps/launcher}/ui/mainwindow.ui | 0 {files => apps/launcher}/ui/settingspage.ui | 0 apps/opencs/CMakeLists.txt | 4 ++-- {files => apps/opencs}/ui/filedialog.ui | 0 apps/wizard/CMakeLists.txt | 18 +++++++++--------- .../wizard/ui}/componentselectionpage.ui | 0 .../wizard/ui}/conclusionpage.ui | 0 .../wizard/ui}/existinginstallationpage.ui | 0 .../ui/wizard => apps/wizard/ui}/importpage.ui | 0 .../wizard/ui}/installationpage.ui | 0 .../wizard/ui}/installationtargetpage.ui | 0 .../ui/wizard => apps/wizard/ui}/intropage.ui | 0 .../wizard/ui}/languageselectionpage.ui | 0 .../wizard/ui}/methodselectionpage.ui | 0 components/CMakeLists.txt | 2 +- .../contentselector}/contentselector.ui | 0 21 files changed, 19 insertions(+), 19 deletions(-) rename {files => apps/launcher}/ui/datafilespage.ui (100%) rename {files => apps/launcher}/ui/directorypicker.ui (100%) rename {files => apps/launcher}/ui/graphicspage.ui (100%) rename {files => apps/launcher}/ui/importpage.ui (100%) rename {files => apps/launcher}/ui/mainwindow.ui (100%) rename {files => apps/launcher}/ui/settingspage.ui (100%) rename {files => apps/opencs}/ui/filedialog.ui (100%) rename {files/ui/wizard => apps/wizard/ui}/componentselectionpage.ui (100%) rename {files/ui/wizard => apps/wizard/ui}/conclusionpage.ui (100%) rename {files/ui/wizard => apps/wizard/ui}/existinginstallationpage.ui (100%) rename {files/ui/wizard => apps/wizard/ui}/importpage.ui (100%) rename {files/ui/wizard => apps/wizard/ui}/installationpage.ui (100%) rename {files/ui/wizard => apps/wizard/ui}/installationtargetpage.ui (100%) rename {files/ui/wizard => apps/wizard/ui}/intropage.ui (100%) rename {files/ui/wizard => apps/wizard/ui}/languageselectionpage.ui (100%) rename {files/ui/wizard => apps/wizard/ui}/methodselectionpage.ui (100%) rename {files/ui => components/contentselector}/contentselector.ui (100%) diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt index daae65dc66..f81870052d 100644 --- a/apps/launcher/CMakeLists.txt +++ b/apps/launcher/CMakeLists.txt @@ -35,13 +35,13 @@ set(LAUNCHER_HEADER # Headers that must be pre-processed set(LAUNCHER_UI - ${CMAKE_SOURCE_DIR}/files/ui/datafilespage.ui - ${CMAKE_SOURCE_DIR}/files/ui/graphicspage.ui - ${CMAKE_SOURCE_DIR}/files/ui/mainwindow.ui - ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui - ${CMAKE_SOURCE_DIR}/files/ui/importpage.ui - ${CMAKE_SOURCE_DIR}/files/ui/settingspage.ui - ${CMAKE_SOURCE_DIR}/files/ui/directorypicker.ui + ${CMAKE_SOURCE_DIR}/apps/launcher/ui/datafilespage.ui + ${CMAKE_SOURCE_DIR}/apps/launcher/ui/graphicspage.ui + ${CMAKE_SOURCE_DIR}/apps/launcher/ui/mainwindow.ui + ${CMAKE_SOURCE_DIR}/apps/launcher/ui/importpage.ui + ${CMAKE_SOURCE_DIR}/apps/launcher/ui/settingspage.ui + ${CMAKE_SOURCE_DIR}/apps/launcher/ui/directorypicker.ui + ${CMAKE_SOURCE_DIR}/components/contentselector/contentselector.ui ) source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER}) diff --git a/files/ui/datafilespage.ui b/apps/launcher/ui/datafilespage.ui similarity index 100% rename from files/ui/datafilespage.ui rename to apps/launcher/ui/datafilespage.ui diff --git a/files/ui/directorypicker.ui b/apps/launcher/ui/directorypicker.ui similarity index 100% rename from files/ui/directorypicker.ui rename to apps/launcher/ui/directorypicker.ui diff --git a/files/ui/graphicspage.ui b/apps/launcher/ui/graphicspage.ui similarity index 100% rename from files/ui/graphicspage.ui rename to apps/launcher/ui/graphicspage.ui diff --git a/files/ui/importpage.ui b/apps/launcher/ui/importpage.ui similarity index 100% rename from files/ui/importpage.ui rename to apps/launcher/ui/importpage.ui diff --git a/files/ui/mainwindow.ui b/apps/launcher/ui/mainwindow.ui similarity index 100% rename from files/ui/mainwindow.ui rename to apps/launcher/ui/mainwindow.ui diff --git a/files/ui/settingspage.ui b/apps/launcher/ui/settingspage.ui similarity index 100% rename from files/ui/settingspage.ui rename to apps/launcher/ui/settingspage.ui diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index b040980529..68d5502890 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -139,8 +139,8 @@ set (OPENCS_RES ${CMAKE_SOURCE_DIR}/files/opencs/resources.qrc ) set (OPENCS_UI - ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui - ${CMAKE_SOURCE_DIR}/files/ui/filedialog.ui + ${CMAKE_SOURCE_DIR}/components/contentselector/contentselector.ui + ${CMAKE_SOURCE_DIR}/apps/opencs/ui/filedialog.ui ) source_group (openmw-cs FILES main.cpp ${OPENCS_SRC} ${OPENCS_HDR}) diff --git a/files/ui/filedialog.ui b/apps/opencs/ui/filedialog.ui similarity index 100% rename from files/ui/filedialog.ui rename to apps/opencs/ui/filedialog.ui diff --git a/apps/wizard/CMakeLists.txt b/apps/wizard/CMakeLists.txt index 588b100ef2..943252151f 100644 --- a/apps/wizard/CMakeLists.txt +++ b/apps/wizard/CMakeLists.txt @@ -34,20 +34,20 @@ set(WIZARD_HEADER ) set(WIZARD_UI - ${CMAKE_SOURCE_DIR}/files/ui/wizard/componentselectionpage.ui - ${CMAKE_SOURCE_DIR}/files/ui/wizard/conclusionpage.ui - ${CMAKE_SOURCE_DIR}/files/ui/wizard/existinginstallationpage.ui - ${CMAKE_SOURCE_DIR}/files/ui/wizard/importpage.ui - ${CMAKE_SOURCE_DIR}/files/ui/wizard/installationtargetpage.ui - ${CMAKE_SOURCE_DIR}/files/ui/wizard/intropage.ui - ${CMAKE_SOURCE_DIR}/files/ui/wizard/languageselectionpage.ui - ${CMAKE_SOURCE_DIR}/files/ui/wizard/methodselectionpage.ui + ${CMAKE_SOURCE_DIR}/apps/wizard/ui/componentselectionpage.ui + ${CMAKE_SOURCE_DIR}/apps/wizard/ui/conclusionpage.ui + ${CMAKE_SOURCE_DIR}/apps/wizard/ui/existinginstallationpage.ui + ${CMAKE_SOURCE_DIR}/apps/wizard/ui/importpage.ui + ${CMAKE_SOURCE_DIR}/apps/wizard/ui/installationtargetpage.ui + ${CMAKE_SOURCE_DIR}/apps/wizard/ui/intropage.ui + ${CMAKE_SOURCE_DIR}/apps/wizard/ui/languageselectionpage.ui + ${CMAKE_SOURCE_DIR}/apps/wizard/ui/methodselectionpage.ui ) if (OPENMW_USE_UNSHIELD) set (WIZARD ${WIZARD} installationpage.cpp unshield/unshieldworker.cpp) set (WIZARD_HEADER ${WIZARD_HEADER} installationpage.hpp unshield/unshieldworker.hpp) - set (WIZARD_UI ${WIZARD_UI} ${CMAKE_SOURCE_DIR}/files/ui/wizard/installationpage.ui) + set (WIZARD_UI ${WIZARD_UI} ${CMAKE_SOURCE_DIR}/apps/wizard/ui/installationpage.ui) add_definitions(-DOPENMW_USE_UNSHIELD) endif (OPENMW_USE_UNSHIELD) diff --git a/files/ui/wizard/componentselectionpage.ui b/apps/wizard/ui/componentselectionpage.ui similarity index 100% rename from files/ui/wizard/componentselectionpage.ui rename to apps/wizard/ui/componentselectionpage.ui diff --git a/files/ui/wizard/conclusionpage.ui b/apps/wizard/ui/conclusionpage.ui similarity index 100% rename from files/ui/wizard/conclusionpage.ui rename to apps/wizard/ui/conclusionpage.ui diff --git a/files/ui/wizard/existinginstallationpage.ui b/apps/wizard/ui/existinginstallationpage.ui similarity index 100% rename from files/ui/wizard/existinginstallationpage.ui rename to apps/wizard/ui/existinginstallationpage.ui diff --git a/files/ui/wizard/importpage.ui b/apps/wizard/ui/importpage.ui similarity index 100% rename from files/ui/wizard/importpage.ui rename to apps/wizard/ui/importpage.ui diff --git a/files/ui/wizard/installationpage.ui b/apps/wizard/ui/installationpage.ui similarity index 100% rename from files/ui/wizard/installationpage.ui rename to apps/wizard/ui/installationpage.ui diff --git a/files/ui/wizard/installationtargetpage.ui b/apps/wizard/ui/installationtargetpage.ui similarity index 100% rename from files/ui/wizard/installationtargetpage.ui rename to apps/wizard/ui/installationtargetpage.ui diff --git a/files/ui/wizard/intropage.ui b/apps/wizard/ui/intropage.ui similarity index 100% rename from files/ui/wizard/intropage.ui rename to apps/wizard/ui/intropage.ui diff --git a/files/ui/wizard/languageselectionpage.ui b/apps/wizard/ui/languageselectionpage.ui similarity index 100% rename from files/ui/wizard/languageselectionpage.ui rename to apps/wizard/ui/languageselectionpage.ui diff --git a/files/ui/wizard/methodselectionpage.ui b/apps/wizard/ui/methodselectionpage.ui similarity index 100% rename from files/ui/wizard/methodselectionpage.ui rename to apps/wizard/ui/methodselectionpage.ui diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index f61a5bd0b2..e762bd4905 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -490,7 +490,7 @@ else () ) endif() -set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui +set (ESM_UI ${CMAKE_SOURCE_DIR}/components/contentselector/contentselector.ui ) if (USE_QT) diff --git a/files/ui/contentselector.ui b/components/contentselector/contentselector.ui similarity index 100% rename from files/ui/contentselector.ui rename to components/contentselector/contentselector.ui From e6690bbcc7f6dedd9f7d1fa524c1734e53076efa Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Tue, 19 Dec 2023 19:58:52 +0400 Subject: [PATCH 2/2] Use CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR --- apps/launcher/CMakeLists.txt | 12 ++++++------ apps/opencs/CMakeLists.txt | 2 +- apps/wizard/CMakeLists.txt | 18 +++++++++--------- components/CMakeLists.txt | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt index f81870052d..8d2208c9df 100644 --- a/apps/launcher/CMakeLists.txt +++ b/apps/launcher/CMakeLists.txt @@ -35,12 +35,12 @@ set(LAUNCHER_HEADER # Headers that must be pre-processed set(LAUNCHER_UI - ${CMAKE_SOURCE_DIR}/apps/launcher/ui/datafilespage.ui - ${CMAKE_SOURCE_DIR}/apps/launcher/ui/graphicspage.ui - ${CMAKE_SOURCE_DIR}/apps/launcher/ui/mainwindow.ui - ${CMAKE_SOURCE_DIR}/apps/launcher/ui/importpage.ui - ${CMAKE_SOURCE_DIR}/apps/launcher/ui/settingspage.ui - ${CMAKE_SOURCE_DIR}/apps/launcher/ui/directorypicker.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/datafilespage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/graphicspage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/mainwindow.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/importpage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/settingspage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/directorypicker.ui ${CMAKE_SOURCE_DIR}/components/contentselector/contentselector.ui ) diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index 68d5502890..cea2b66331 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -140,7 +140,7 @@ set (OPENCS_RES ${CMAKE_SOURCE_DIR}/files/opencs/resources.qrc set (OPENCS_UI ${CMAKE_SOURCE_DIR}/components/contentselector/contentselector.ui - ${CMAKE_SOURCE_DIR}/apps/opencs/ui/filedialog.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/filedialog.ui ) source_group (openmw-cs FILES main.cpp ${OPENCS_SRC} ${OPENCS_HDR}) diff --git a/apps/wizard/CMakeLists.txt b/apps/wizard/CMakeLists.txt index 943252151f..8c459f4f9c 100644 --- a/apps/wizard/CMakeLists.txt +++ b/apps/wizard/CMakeLists.txt @@ -34,20 +34,20 @@ set(WIZARD_HEADER ) set(WIZARD_UI - ${CMAKE_SOURCE_DIR}/apps/wizard/ui/componentselectionpage.ui - ${CMAKE_SOURCE_DIR}/apps/wizard/ui/conclusionpage.ui - ${CMAKE_SOURCE_DIR}/apps/wizard/ui/existinginstallationpage.ui - ${CMAKE_SOURCE_DIR}/apps/wizard/ui/importpage.ui - ${CMAKE_SOURCE_DIR}/apps/wizard/ui/installationtargetpage.ui - ${CMAKE_SOURCE_DIR}/apps/wizard/ui/intropage.ui - ${CMAKE_SOURCE_DIR}/apps/wizard/ui/languageselectionpage.ui - ${CMAKE_SOURCE_DIR}/apps/wizard/ui/methodselectionpage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/componentselectionpage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/conclusionpage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/existinginstallationpage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/importpage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/installationtargetpage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/intropage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/languageselectionpage.ui + ${CMAKE_CURRENT_SOURCE_DIR}/ui/methodselectionpage.ui ) if (OPENMW_USE_UNSHIELD) set (WIZARD ${WIZARD} installationpage.cpp unshield/unshieldworker.cpp) set (WIZARD_HEADER ${WIZARD_HEADER} installationpage.hpp unshield/unshieldworker.hpp) - set (WIZARD_UI ${WIZARD_UI} ${CMAKE_SOURCE_DIR}/apps/wizard/ui/installationpage.ui) + set (WIZARD_UI ${WIZARD_UI} ${CMAKE_CURRENT_SOURCE_DIR}/ui/installationpage.ui) add_definitions(-DOPENMW_USE_UNSHIELD) endif (OPENMW_USE_UNSHIELD) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index e762bd4905..a335f81de0 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -490,7 +490,7 @@ else () ) endif() -set (ESM_UI ${CMAKE_SOURCE_DIR}/components/contentselector/contentselector.ui +set (ESM_UI ${CMAKE_CURRENT_SOURCE_DIR}/contentselector/contentselector.ui ) if (USE_QT)