mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-22 16:10:11 +00:00
cmake: Add SDL2 alias when using system library
This commit is contained in:
parent
cbd5d1c15c
commit
b5872ea79e
@ -370,6 +370,10 @@ endif()
|
|||||||
# SDL2
|
# SDL2
|
||||||
if (ENABLE_SDL2 AND USE_SYSTEM_SDL2)
|
if (ENABLE_SDL2 AND USE_SYSTEM_SDL2)
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(SDL2 REQUIRED)
|
||||||
|
add_library(SDL2 INTERFACE)
|
||||||
|
target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}")
|
||||||
|
target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
|
||||||
|
add_library(SDL2::SDL2 ALIAS SDL2)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
Loading…
Reference in New Issue
Block a user