From 38aceae807374eccb1a013c2299a9fe8891352ba Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Tue, 17 Nov 2020 03:53:06 +0530 Subject: [PATCH] Assume ${SDL2_LIBRARIES} if not defined ${SDL2_LIBRARIES} may sometimes not be defined on Arch Linux and this could cause build failure. Also see https://github.com/tsoding/nothing/issues/923. --- ballisticacore-cmake/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ballisticacore-cmake/CMakeLists.txt b/ballisticacore-cmake/CMakeLists.txt index 358cf738..08af1583 100644 --- a/ballisticacore-cmake/CMakeLists.txt +++ b/ballisticacore-cmake/CMakeLists.txt @@ -32,6 +32,10 @@ if (HEADLESS) else () find_package(SDL2 QUIET) if (SDL2_FOUND) + if ("${SDL2_LIBRARIES}" STREQUAL "") + message(WARNING "SDL2_LIBRARIES wasn't set, manually setting to SDL2::SDL2") + set(SDL2_LIBRARIES "SDL2::SDL2") + endif () # Getting complaint about space at the end of this on ubuntu16. string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES) else ()