-
Notifications
You must be signed in to change notification settings - Fork 8
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
Wish: Recognize commands for Qt projects #48
Comments
I would like to avoid bringing other commands as supported out of the box for two reasons:
Perhaps there's alternative approach available. First thing that came to my mind would be supporting some kind of plugin system and I could even advertise such plugins in README, prepare an example plugin etc. I guess that would be the closest to out of the box experience. Another approach, although it might suffer from version problem alluded earlier, would be supporting some kind of community driven repository of such commands. I'm guessing there's some room for Boost, Qt, SDL and other popular libraries which might provide their own custom commands. This is somewhat weaker variant of plugin approach. I need to think a little bit more to find a satisfactory solution for myself and the users. |
@winterz |
on linux anyway there is /usr/lib64/cmake (or /usr/lib/cmake). it's a bit slower (not by much and there are lots of "ignoring" messages), but what if we added an option for searching built-in system directories. you can already do this yourself with also this doesn't help if you hand-built Qt/boost/etc or installed yourself in non-standard locations. |
Although tempting how easy it would be here's a caveat why it won't work in general (you might have already noticed the pattern of difficult to achieve generality): Taking for instance if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
function(qt_add_big_resources outfiles)
if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
qt5_add_big_resources(${outfiles} ${ARGN})
elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
qt6_add_big_resources(${outfiles} ${ARGN})
endif()
set("${outfiles}" "${${outfiles}}" PARENT_SCOPE)
endfunction()
endif()
function(qt6_add_big_resources outfiles )
# ...
set(options)
set(oneValueArgs)
set(multiValueArgs OPTIONS)
cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# ...
endfunction() I'm slowly converging to conclusion that plugin based approach might be the best in general because you could then simply install
I hope to find some time for these activities after New Year's Day. |
We write a lot of Qt-based projects.
In order to have a nicely working gersemi we need to add "stubs" (like qt_commands.cmake.txt) for the Qt CMake commands to every single project.
iow: we copy the attachment (remove the '.txt' extension) into ./cmake/stubs for every project and have
definitions=[./cmake/stubs]
in our .gersemircit would be really nice if gersemi could somehow recognize Qt commands automatically.
The complete list of CMake commands provided by Qt is at https://doc.qt.io/qt-6/cmake-command-reference.html
It is a long list; and probably a list that will change with new Qt releases.
The text was updated successfully, but these errors were encountered: