From 8cff2b7c67dc05fbafd4bf19ee8e79a0ccb72df4 Mon Sep 17 00:00:00 2001 From: Ivan Epifanov Date: Tue, 27 Apr 2021 13:51:53 +0300 Subject: [PATCH] Cmake < 3.18 fix --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index db8d9e23e..d74adcfcf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,6 +215,7 @@ else() elseif(TARGET SDL2::SDL2-static) # On some distros, such as vitasdk, only the SDL2::SDL2-static target is available. # Alias to SDL2::SDL2 because some finder scripts may refer to SDL2::SDL2. + set_target_properties(SDL2::SDL2-static PROPERTIES IMPORTED_GLOBAL TRUE) add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static) set(SDL2_MAIN SDL2::SDL2main) else()