-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add option to enable opengl support in QCustomPlot #11591
Add option to enable opengl support in QCustomPlot #11591
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Something broke in the Visual Studio build. Will close and reopen this PR to trigger CI rebuild. (This is what I was told to do in another recipe I was working on). |
@SpaceIm, looking at the history for qcustomplot conanfile it looks like you have been involved in the creation of this recipe. Can you help me understand what is going wrong here? There is something about a missing dependency in one of the visual studio builds. |
I guess it's not directly related to qcustomplot but to a new transitive dependency in qt dependency graph. |
This comment has been minimized.
This comment has been minimized.
/ping @jgsogo, qt5 recipe has been updated recently (#11531), and I don't see any other PR afterwards which could change its package ids, so maybe few binaries have not been uploaded to artifactory? I see on https://conan.io/center/qt?version=5.15.3&tab=dependencies&os=Windows that several Visual Studio configurations are missing. qt recipes raises for MT & shared, so for each Visual Studio version, we should see 6 configurations (4 for static, 2 for shared), but I see only 4 package id for Visual Studio 2017 & 3 for Visual Studio 2019. |
Thanks for looking into this! It did seem like something out of my control... |
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
You should check in |
Okay, I can do that. I do however have questions about how to handle opengl32 linking on windows specifically. I have been reading https://doc.qt.io/qt-6/windows-graphics.html, and from what I understand, unless the code uses QOpenGLFunctions (which QCustomPlot does not) I have to link to OpenGL32.lib on Windows to get things to work. Another alternative would be to require that To summarize the Qt opengl thing I believe it works this way: If you specify "dynamic" you have to call opengl stuff through the QOpenGLFunctions class, and Qt will magically use the appropriate opengl library. If you specify "desktop" you will get linked to OpenGL32 (through QtX::OpenGL). If you specify "dynamic" you can still add linking to OpenGL32.lib explicitly, but I think this means exactly the same thing as using "desktop". I would appreciate guidance on how to do this in the conan recipe, in a way that provides the fewest surprises to users and is maintainable... Another solution would be to patch QCustomPlot according to this forum post https://www.qcustomplot.com/index.php/support/forum/1281, to make "dynamic" work, but that does seem a bit too invasive. Edit: Tried to set qt:opengl to desktop, but still get linkage errors. |
…o better set up link dependencies.
Since I didn't hear anything about my comment above I chose to just improve my initial implementation to get a reaction :-D |
This comment has been minimized.
This comment has been minimized.
@spacelm, what do you think of the current state of this PR? |
About
The most simple explanation is a race condition: a new recipe revision of Qt was being merged into the central repository while your PR was running... Conan was able to find the recipe (it is uploaded first) but not the package (we copy/move packages one by one and it takes some time). I've triggered this PR manually again, let's see if we find the same error. |
All green in build 11 (
|
👍 It looks like that was the issue. Now build has passed. Time for reviews! Thanks! |
Specify library name and version: qcustomplot/2.1.0
This PR adds an option to enable opengl support in the QCustomPlot recipe. In the current recipe there is a TODO that this should be done, and this PR fixes that TODO. The default is to have opengl support disabled, so as to not change the behaviour for current users.