mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-02 00:42:33 +01:00
9231ecbcb0
- OpenGL::GL -> defined to the platform-specific OpenGL libraries - OpenGL::OpenGL -> defined to libOpenGL if the system is GLVND
15 lines
553 B
CMake
15 lines
553 B
CMake
include("${CMAKE_ROOT}/Modules/FindOpenGL.cmake")
|
|
|
|
if(OPENGL_FOUND AND NOT TARGET OpenGL::GL)
|
|
list(GET OPENGL_LIBRARIES 0 OPENGL_FIRST_LIBRARY)
|
|
set(OPENGL_OTHER_LIBRARIES "${OPENGL_LIBRARIES}")
|
|
list(REMOVE_AT OPENGL_OTHER_LIBRARIES 0)
|
|
add_library(OpenGL::GL UNKNOWN IMPORTED)
|
|
set_target_properties(OpenGL::GL PROPERTIES
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C;CXX"
|
|
IMPORTED_LOCATION "${OPENGL_FIRST_LIBRARY}"
|
|
INTERFACE_LINK_LIBRARIES "${OPENGL_OTHER_LIBRARIES}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}"
|
|
)
|
|
endif()
|