mirror of https://github.com/aap/librw.git
cmake: give priority to SDL2 config
This commit is contained in:
parent
d53e325b72
commit
0155539316
|
@ -20,7 +20,10 @@ if(LIBRW_PLATFORM_GL3)
|
||||||
endif()
|
endif()
|
||||||
elseif(LIBRW_GL3_GFXLIB STREQUAL "SDL2")
|
elseif(LIBRW_GL3_GFXLIB STREQUAL "SDL2")
|
||||||
if (NOT TARGET SDL2::SDL2)
|
if (NOT TARGET SDL2::SDL2)
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(SDL2 CONFIG)
|
||||||
|
if (NOT TARGET SDL2::SDL2)
|
||||||
|
find_package(SDL2 MODULE REQUIRED)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -159,7 +159,10 @@ if(LIBRW_PLATFORM_GL3)
|
||||||
)
|
)
|
||||||
elseif (LIBRW_GL3_GFXLIB STREQUAL "SDL2")
|
elseif (LIBRW_GL3_GFXLIB STREQUAL "SDL2")
|
||||||
if (NOT TARGET SDL2::SDL2)
|
if (NOT TARGET SDL2::SDL2)
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(SDL2 CONFIG)
|
||||||
|
if (NOT TARGET SDL2::SDL2)
|
||||||
|
find_package(SDL2 MODULE REQUIRED)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
target_compile_definitions(librw PUBLIC LIBRW_SDL2)
|
target_compile_definitions(librw PUBLIC LIBRW_SDL2)
|
||||||
target_link_libraries(librw
|
target_link_libraries(librw
|
||||||
|
|
Loading…
Reference in New Issue