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.
This commit is contained in:
Scott Moreau 2012-09-02 16:53:15 -06:00
parent 7be4f1f747
commit 1ffb9ce47e

View file

@ -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})