From 1ffb9ce47eb2f84dc5feda027aa09991778ff283 Mon Sep 17 00:00:00 2001 From: Scott Moreau Date: Sun, 2 Sep 2012 16:53:15 -0600 Subject: [PATCH] Fix broken build when using SDL from Externals. The problem here was the logic that detects SDL in the main CMakeLists.txt is not the same as it is in DolphinWX/CmakeLists.txt to set libraries. When using SDL from Externals it failed at link time because -lSDL was never set. This fixes the problem by using the same condition logic to set the libs as used when detecting SDL in the first place. --- Source/Core/DolphinWX/CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index ef41d4f279..77ac9eb439 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -13,12 +13,18 @@ set(LIBS core ${X11_LIBRARIES}) if(SDL2_FOUND) + # Using shared SDL2 set(LIBS ${LIBS} ${SDL2_LIBRARY}) +else(SDL2_FOUND) + if(SDL_FOUND) + # Using shared SDL + set(LIBS ${LIBS} ${SDL_LIBRARY}) + else(SDL_FOUND) + # Using static SDL from Externals + set(LIBS ${LIBS} SDL) + endif() endif() -if(SDL_FOUND) - set(LIBS ${LIBS} ${SDL_LIBRARY}) -endif() if(LIBAV_FOUND) set(LIBS ${LIBS} ${LIBAV_LIBRARIES})