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:
parent
934506f0c8
commit
9231ecbcb0
@ -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}"
|
||||
|
@ -58,7 +58,7 @@ target_link_libraries(rwlib
|
||||
PUBLIC
|
||||
openrw::interface
|
||||
PRIVATE
|
||||
OpenGL::OpenGL
|
||||
OpenGL::GL
|
||||
)
|
||||
|
||||
openrw_target_apply_options(TARGET rwlib)
|
||||
|
Loading…
Reference in New Issue
Block a user