New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace call QT5_WRAP_UI
with CMAKE_AUTOUIC
#7200
Conversation
Not deprecated looking at the documentation, but with Qt6 they changed it to just |
That's with the versionless targets from what i understand. I still use versioned targets for compat with existing qt5 stuff. |
You can avoid moving the However, we want to rewrite the |
@DomClark done. |
Sf2Player and GigPlayer have ui files, too. I guess our build_plugin function in cmake doesn't need to be changed? It still calls |
@Veratil i haven't extended this PR to plugins yet. I will soon. |
Nvm, I am not touching plugin code for now. |
We should actually apply what was done here to those files as well, yeah. Luckily, it seems the only other caller for |
I have removed both |
Everything fails. I'll try something else. |
What's with all these CI fails? I assume the build is ok since it succeeds with linux but if so, why does everything else fails. Looking at the logs give errors at unrelated places. Would someone please help. |
|
The issue is that you've removed the |
I forgot to add the |
Converted to draft to block merge. Minor changes left which I will do when i get back on my laptop. |
Ready for merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should now be able to remove the UICFILES
parameter of build_plugin
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UICFILES
parameter is still mentioned in the documentation of build_plugin
, and passed to the cmake_parse_arguments
command. It should be removed from those too.
Newer CMake versions now generate warnings like this:
CMake Warning (dev) in plugins/Sid/resid/CMakeLists.txt:
Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
For compatibility, CMake is excluding the GENERATED source file(s):
"D:/a/lmms/lmms/build/plugins/Sid/resid/resid/wave6581_PST.h"
"D:/a/lmms/lmms/build/plugins/Sid/resid/resid/wave6581_PS_.h"
"D:/a/lmms/lmms/build/plugins/Sid/resid/resid/wave6581_P_T.h"
"D:/a/lmms/lmms/build/plugins/Sid/resid/resid/wave6581__ST.h"
"D:/a/lmms/lmms/build/plugins/Sid/resid/resid/wave8580_PST.h"
"D:/a/lmms/lmms/build/plugins/Sid/resid/resid/wave8580_PS_.h"
"D:/a/lmms/lmms/build/plugins/Sid/resid/resid/wave8580_P_T.h"
"D:/a/lmms/lmms/build/plugins/Sid/resid/resid/wave8580__ST.h"
from processing by AUTOUIC. If any of the files should be processed, set
CMP0071 to NEW. If any of the files should not be processed, explicitly
exclude them by setting the source file property SKIP_AUTOUIC:
set_property(SOURCE file.h PROPERTY SKIP_AUTOUIC ON)
Similar ones occur for the SWH LADSPA plugins.
You can fix these warnings by setting the SKIP_AUTOUIC
property like this:
diff --git a/plugins/LadspaEffect/swh/CMakeLists.txt b/plugins/LadspaEffect/swh/CMakeLists.txt
index a83001177..45210e05f 100644
--- a/plugins/LadspaEffect/swh/CMakeLists.txt
+++ b/plugins/LadspaEffect/swh/CMakeLists.txt
@@ -31,6 +31,10 @@ FOREACH(_item ${XML_SOURCES})
VERBATIM
)
+ set_source_files_properties("${_out_file}" PROPERTIES
+ SKIP_AUTOUIC ON
+ )
+
# Add a library target for this C file, which depends on success of makestup.pl
ADD_LIBRARY("${_plugin}" MODULE "${_out_file}")
diff --git a/plugins/Sid/resid/CMakeLists.txt b/plugins/Sid/resid/CMakeLists.txt
index bb39e3d16..514776390 100644
--- a/plugins/Sid/resid/CMakeLists.txt
+++ b/plugins/Sid/resid/CMakeLists.txt
@@ -56,6 +56,9 @@ foreach(WAVE_DATA IN LISTS RESID_WAVES)
"${WAVE_SRC_OUT}"
)
add_custom_command(OUTPUT ${WAVE_SRC_OUT} COMMAND ${WAVE_COMMAND} VERBATIM)
+ set_source_files_properties("${WAVE_SRC_OUT}" PROPERTIES
+ SKIP_AUTOUIC ON
+ )
target_sources(resid_objects PUBLIC ${WAVE_SRC_OUT})
endforeach()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good now. I would still remove UICFILES <UI_FILES_TO_COMPILE>
from the documentation of build_plugin
(line 4 of BuildPlugin.cmake
), though.
Done |
This PR is meant to simplify some cmake code removing the deprecated (not really sure) qt5_wrap_ui call and replace it with more supported cmake_autouic. Caught this because of a build fail with qt6 on windows.
Had to move the ui files to include to remove the build fail.