1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-04 09:39:46 +02:00

cmake: use OpenGL::GL instead of OpenGL::OpenGL

- OpenGL::GL -> defined to the platform-specific OpenGL libraries
- OpenGL::OpenGL -> defined to libOpenGL if the system is GLVND
This commit is contained in:
Anonymous Maarten 2017-12-11 22:55:33 +01:00 committed by Daniel Evans
parent 934506f0c8
commit 9231ecbcb0
2 changed files with 4 additions and 4 deletions

View File

@ -1,11 +1,11 @@
include("${CMAKE_ROOT}/Modules/FindOpenGL.cmake")
if(OPENGL_FOUND AND NOT TARGET OpenGL::OpenGL)
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::OpenGL UNKNOWN IMPORTED)
set_target_properties(OpenGL::OpenGL PROPERTIES
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}"

View File

@ -58,7 +58,7 @@ target_link_libraries(rwlib
PUBLIC
openrw::interface
PRIVATE
OpenGL::OpenGL
OpenGL::GL
)
openrw_target_apply_options(TARGET rwlib)