Hello,
I'm currently trying to enable OpenGL support for QCustomPlot in my project using CMake, but I am running into an issue.
Here is what I have tried so far:
add_definitions(-DQCUSTOMPLOT_USE_OPENGL) target_add_definitions(my_program PRIVATE QCUSTOMPLOT_USE_OPENGL) find_package(OpenGL REQUIRED) target_link_libraries(my_program Qt5::Widgets QCustomPlot OpenGL::GL)
However, after building the project, the QCustomPlot graphs still do not use OpenGL for rendering, and I am still encountering the following error:
void QCustomPlot::setOpenGl(bool, int) QCustomPlot can't use OpenGL because QCUSTOMPLOT_USE_OPENGL was not defined during compilation (add 'DEFINES += QCUSTOMPLOT_USE_OPENGL' to your qmake .pro file)
Is it even possible to use OpenGL support with QCustomPlot when building with CMake, or is it only supported in qmake?