CMake: Check for OpenGL in imported target
The gl target uses OpenGL libraries, so these must be defined. Previously, the user has to do this before importing the wxWidget target.
This commit is contained in:
parent
a63ba1cc04
commit
302ad5f7cd
1 changed files with 6 additions and 0 deletions
|
|
@ -127,6 +127,12 @@ foreach(libname @wxLIB_TARGETS@)
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
if(TARGET wx::wxgl)
|
||||
# make sure OpenGL targets are available:
|
||||
# The link interface of target "wx::wxgl" contains: OpenGL::GLU
|
||||
find_package(OpenGL QUIET)
|
||||
endif()
|
||||
|
||||
# if no components are specified in find_package, check all of them
|
||||
if(NOT @PROJECT_NAME@_FIND_COMPONENTS)
|
||||
set(@PROJECT_NAME@_FIND_COMPONENTS ${@PROJECT_NAME@_COMPONENTS})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue