Archived
1
Fork 0

Fallback to find module on Linux if SDL2 isn't found yet

This commit is contained in:
Joshua Goins 2022-02-21 11:07:09 -05:00
parent a3704eb7a9
commit a9e7a46edc

View file

@ -16,7 +16,10 @@ include(FetchContent)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
message("Linux build detected!")
find_package(SDL2 REQUIRED CONFIG)
find_package(SDL2 CONFIG)
if(NOT TARGET SDL2::SDL2)
find_package(SDL2 REQUIRED)
endif()
set(ENABLE_VULKAN TRUE)
set(ENABLE_LINUX TRUE)