1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 11:22:45 +01:00
openrw/cmake/modules/FindOpenGL.cmake
2017-10-29 20:40:57 +00:00

15 lines
535 B
CMake

include("${CMAKE_ROOT}/Modules/FindOpenGL.cmake")
if(OPENGL_FOUND)
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
IMPORTED_LINK_INTERFACE_LANGUAGES "C;CXX"
IMPORTED_LOCATION "${OPENGL_FIRST_LIBRARY}"
INTERFACE_LINK_LIBRARIES "${OPENGL_OTHER_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}"
)
endif()