VTK cannot open file OpenGL::GL.lib

I want to link RenderingOpenGL2 in my project:

find_package(VTK
COMPONENTS
   ...
   RenderingOpenGL2
)

But the cmake reports a bug:

Target "Pro" links to target "OpenGL::GL" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

If I remove RenderingOpenGL2 from find_package, the cmake is OK. But my project directly return 0 with no window is shown. My code is

	vtkSmartPointer<vtkSphereSource> sphere = vtkSmartPointer<vtkSphereSource>::New();
	sphere->Update();
	vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
	mapper->SetInputData(sphere->GetOutput());
	vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
	actor->SetMapper(mapper);
	vtkSmartPointer<vtkRenderer> render = vtkSmartPointer<vtkRenderer>::New();
	render->AddActor(actor);
	vtkSmartPointer<vtkRenderWindow> renWin = vtkSmartPointer<vtkRenderWindow>::New();
	renWin->AddRenderer(render);
	renWin->Render();
	vtkSmartPointer<vtkRenderWindowInteractor> iren = vtkSmartPointer<vtkRenderWindowInteractor>::New();
	iren->SetRenderWindow(renWin);
	iren->Initialize();
	iren->Start();

Hello,

Why are you find_package()-ing RenderingOpenGL2 in the configuration of your application? That configuration is done when building VTK.

regards,

Paulo