MantisBT - Doomseeker
View Issue Details
0003824Doomseeker[All Projects] Cleanuppublic2020-06-09 14:382020-06-15 00:22
WubTheCaptain 
 
nonetrivialalways
confirmedopen 
1.3.1 
 
0003824: No AUTOUIC, qt5_wrap_ui() macro is used
CMake's build files handle Qt's XML format user interface definition (.ui) files manually, with qt5_wrap_ui() macro. May be more ideal to use CMake's AUTOUIC to avoid cluttering the build files, which has been supported since CMake 3.0 or so.
$ grep -r "qt5_wrap_ui" .
./src/plugins/zandronum/CMakeLists.txt:qt5_wrap_ui(ZANDRONUM_UI_FILES
./src/core/CMakeLists.txt:qt5_wrap_ui(doomseekerUI ${UI_FILES})

$ grep -r "UI_FILES" .
./src/plugins/zandronum/CMakeLists.txt:qt5_wrap_ui(ZANDRONUM_UI_FILES
./src/plugins/zandronum/CMakeLists.txt: ${ZANDRONUM_UI_FILES}
./src/plugins/zandronum/CMakeLists.txt: ${ZANDRONUM_UI_FILES}
./src/core/CMakeSpawnFileListing.cmake:file(GLOB_RECURSE UI_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} 
"*.ui")
./src/core/CMakeSpawnFileListing.cmake:append_file_list(${FILE_NAME} "UI_FILES" "${UI_FILES}")

./src/core/CMakeLists.txt:qt5_wrap_ui(doomseekerUI ${UI_FILES})
./src/core/CMakeLists.txt:      ${UI_FILES}
./src/core/CMakeFileListing.cmake:set(UI_FILES
https://cmake.org/cmake/help/latest/prop_tgt/AUTOUIC.html [^]
https://stackoverflow.com/a/42331649 [^]
git blame src/core/CMakeLists.txt says git show 95cdd026d, by Pol M.
No tags attached.
Issue History
2020-06-09 14:38WubTheCaptainNew Issue
2020-06-09 14:40WubTheCaptainNote Added: 0021460
2020-06-09 14:40WubTheCaptainSeverityfeature => trivial
2020-06-15 00:22Pol MNote Added: 0021463
2020-06-15 00:22Pol MStatusnew => confirmed

Notes
(0021460)
WubTheCaptain   
2020-06-09 14:40   
And no offense to Pol M, the previous qt4_wrap_ui() that commit mentioned in OP was likely predating CMake 3.0 too.
(0021463)
Pol M   
2020-06-15 00:22   
Pretty in favor, I did not know this existed and it seems cleaner and more future proof. Any shenanigans that we do in cmake that can be automated further are a clear improvement.
No offense taken, I just took the simple path as at the time that was as much as it was needed.