Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
soreau committed Sep 2, 2012
1 parent 7be4f1f commit 1ffb9ce
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Source/Core/DolphinWX/CMakeLists.txt
Expand Up @@ -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})
Expand Down

0 comments on commit 1ffb9ce

Please sign in to comment.