librw/cmake/librw-config.cmake.in

25 lines
760 B
CMake
Raw Normal View History

include("${CMAKE_CURRENT_LIST_DIR}/librw-targets.cmake")
set(LIBRW_PLATFORM "@LIBRW_PLATFORM@")
set(LIBRW_PLATFORMS "@LIBRW_PLATFORMS@")
set(LIBRW_PLATFORM_@LIBRW_PLATFORM@ ON)
set(LIBRW_PLATFORM_GL3_REQUIRES_OPENGL @LIBRW_PLATFORM_GL3_REQUIRES_OPENGL@)
if(LIBRW_PLATFORM_GL3)
set(LIBRW_GL3_GFXLIB "@LIBRW_GL3_GFXLIB@")
set(LIBRW_GL3_GFXLIBS "@LIBRW_GL3_GFXLIBS@")
if(LIBRW_PLATFORM_GL3_REQUIRES_OPENGL)
set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED)
endif()
if(NINTENDO_SWITCH)
find_package(NXGL REQUIRED)
endif()
if(LIBRW_GL3_GFXLIB STREQUAL "GLFW")
find_package(glfw3 REQUIRED)
2021-01-03 03:40:59 +08:00
elseif(LIBRW_GL3_GFXLIB STREQUAL "SDL2")
find_package(SDL2 REQUIRED)
endif()
endif()