2020-11-30 19:22:18 +00:00
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/librw-targets.cmake")
|
|
|
|
|
|
|
|
set(LIBRW_PLATFORM "@LIBRW_PLATFORM@")
|
|
|
|
set(LIBRW_PLATFORMS "@LIBRW_PLATFORMS@")
|
|
|
|
set(LIBRW_PLATFORM_@LIBRW_PLATFORM@ ON)
|
|
|
|
|
|
|
|
if(LIBRW_PLATFORM_GL3)
|
|
|
|
set(LIBRW_GL3_GFXLIB "@LIBRW_GL3_GFXLIB@")
|
|
|
|
set(LIBRW_GL3_GFXLIBS "@LIBRW_GL3_GFXLIBS@")
|
|
|
|
|
2021-06-27 17:43:30 +01:00
|
|
|
set(OpenGL_GL_PREFERENCE GLVND)
|
|
|
|
find_package(OpenGL)
|
2021-07-04 15:51:20 +01:00
|
|
|
if(NOT TARGET OpenGL::OpenGL AND NOT TARGET OpenGL::EGL AND NOT TARGET OpenGL::GL)
|
2021-07-04 17:02:36 +01:00
|
|
|
message(FATAL_ERROR "find_package(OpenGL) failed: no target was created")
|
2021-06-17 22:44:07 +01:00
|
|
|
endif()
|
2021-06-27 17:43:30 +01:00
|
|
|
|
2020-11-30 19:22:18 +00:00
|
|
|
if(LIBRW_GL3_GFXLIB STREQUAL "GLFW")
|
2022-12-14 13:30:36 +00:00
|
|
|
if (NOT TARGET glfw)
|
|
|
|
find_package(glfw3 REQUIRED)
|
|
|
|
endif()
|
2021-01-02 19:40:59 +00:00
|
|
|
elseif(LIBRW_GL3_GFXLIB STREQUAL "SDL2")
|
2022-12-14 13:30:36 +00:00
|
|
|
if (NOT TARGET SDL2::SDL2)
|
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
endif()
|
2020-11-30 19:22:18 +00:00
|
|
|
endif()
|
|
|
|
endif()
|