mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-25 11:52:40 +01: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")
|
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)
|
list(GET OPENGL_LIBRARIES 0 OPENGL_FIRST_LIBRARY)
|
||||||
set(OPENGL_OTHER_LIBRARIES "${OPENGL_LIBRARIES}")
|
set(OPENGL_OTHER_LIBRARIES "${OPENGL_LIBRARIES}")
|
||||||
list(REMOVE_AT OPENGL_OTHER_LIBRARIES 0)
|
list(REMOVE_AT OPENGL_OTHER_LIBRARIES 0)
|
||||||
add_library(OpenGL::OpenGL UNKNOWN IMPORTED)
|
add_library(OpenGL::GL UNKNOWN IMPORTED)
|
||||||
set_target_properties(OpenGL::OpenGL PROPERTIES
|
set_target_properties(OpenGL::GL PROPERTIES
|
||||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C;CXX"
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C;CXX"
|
||||||
IMPORTED_LOCATION "${OPENGL_FIRST_LIBRARY}"
|
IMPORTED_LOCATION "${OPENGL_FIRST_LIBRARY}"
|
||||||
INTERFACE_LINK_LIBRARIES "${OPENGL_OTHER_LIBRARIES}"
|
INTERFACE_LINK_LIBRARIES "${OPENGL_OTHER_LIBRARIES}"
|
||||||
|
@ -58,7 +58,7 @@ target_link_libraries(rwlib
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
openrw::interface
|
openrw::interface
|
||||||
PRIVATE
|
PRIVATE
|
||||||
OpenGL::OpenGL
|
OpenGL::GL
|
||||||
)
|
)
|
||||||
|
|
||||||
openrw_target_apply_options(TARGET rwlib)
|
openrw_target_apply_options(TARGET rwlib)
|
||||||
|
Loading…
Reference in New Issue
Block a user