From 518fdbb767ac635983cf4e6d1ec51053c6aa8e1b Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Thu, 26 Oct 2023 23:22:53 +0200 Subject: [PATCH] vtk: Add missing OpenGL link target Without this, linking fails with CMakeFiles/Vtk.dir/vtkAvogadroActor.cpp.o: in function `vtkAvogadroActor::RenderOpaqueGeometry(vtkViewport*)': /usr/src/debug/avogadrolibs/avogadrolibs-1.98.0/avogadro/vtk/vtkAvogadroActor.cpp:56:(.text+0x27a): undefined reference to `glGetFloatv' /usr/bin/ld: /usr/src/debug/avogadrolibs/avogadrolibs-1.98.0/avogadro/vtk/vtkAvogadroActor.cpp:57:(.text+0x28d): undefined reference to `glGetFloatv' /usr/bin/ld: CMakeFiles/Vtk.dir/vtkAvogadroActor.cpp.o: in function `vtkAvogadroActor::RenderTranslucentPolygonalGeometry(vtkViewport*)': /usr/src/debug/avogadrolibs/avogadrolibs-1.98.0/avogadro/vtk/vtkAvogadroActor.cpp:74:(.text+0x4af): undefined reference to `glGetFloatv' /usr/bin/ld: /usr/src/debug/avogadrolibs/avogadrolibs-1.98.0/avogadro/vtk/vtkAvogadroActor.cpp:75:(.text+0x4c2): undefined reference to `glGetFloatv' collect2: error: ld returned 1 exit status --- avogadro/vtk/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avogadro/vtk/CMakeLists.txt b/avogadro/vtk/CMakeLists.txt index 8866501bc9..549626e42f 100644 --- a/avogadro/vtk/CMakeLists.txt +++ b/avogadro/vtk/CMakeLists.txt @@ -37,7 +37,7 @@ target_link_libraries(Vtk PUBLIC Avogadro::Rendering Avogadro::QtGui VTK::RenderingOpenGL2 VTK::GUISupportQt VTK::RenderingVolumeOpenGL2 VTK::RenderingFreeType VTK::InteractionStyle VTK::ChartsCore VTK::ViewsContext2D VTK::RenderingContextOpenGL2 VTK::DomainsChemistryOpenGL2 Qt::Widgets - PRIVATE GLEW::GLEW) + PRIVATE GLEW::GLEW OpenGL::GL) vtk_module_autoinit(TARGETS Vtk MODULES VTK::RenderingOpenGL2 VTK::GUISupportQt VTK::RenderingVolumeOpenGL2