--- a/QTfrontend/CMakeLists.txt Wed Nov 06 00:59:33 2013 +0400
+++ b/QTfrontend/CMakeLists.txt Tue Nov 05 23:33:23 2013 +0100
@@ -26,7 +26,9 @@
include_directories(${SDLMIXER_INCLUDE_DIR})
else(${USESDL12})
find_package(SDL2 REQUIRED)
+ find_package(SDL2_mixer REQUIRED) #audio in SDLInteraction
include_directories(${SDL2_INCLUDE_DIR})
+ include_directories(${SDL2MIXER_INCLUDE_DIR})
endif(${USESDL12})
if(${FFMPEG_FOUND})
--- a/hedgewars/CMakeLists.txt Wed Nov 06 00:59:33 2013 +0400
+++ b/hedgewars/CMakeLists.txt Tue Nov 05 23:33:23 2013 +0100
@@ -108,7 +108,7 @@
#DEPENDECIES AND EXECUTABLES SECTION
-if(NOT ${BUILD_ENGINE_LIBRARY} AND APPLE)
+if(NOT ${BUILD_ENGINE_LIBRARY} AND APPLE AND ${USESDL12})
#on OSX we need to provide the SDL_main() function when building as executable
add_subdirectory(sdlmain)
list(APPEND HW_LINK_LIBS SDLmain)
--- a/hedgewars/SDLh.pas Wed Nov 06 00:59:33 2013 +0400
+++ b/hedgewars/SDLh.pas Tue Nov 05 23:33:23 2013 +0100
@@ -55,15 +55,23 @@
{$IFDEF DARWIN}
{$IFNDEF HWLIBRARY}
- {$linklib SDLmain}
- {$PASCALMAINNAME SDL_main}
- {$linkframework Cocoa}
- {$linkframework SDL}
- {$linkframework SDL_net}
- {$linkframework SDL_image}
- {$linkframework SDL_ttf}
- {$linkframework SDL_mixer}
- {$linkframework OpenGL}
+ {$IFDEF SDL2}
+ {$linkframework SDL2}
+ {$linkframework SDL2_net}
+ {$linkframework SDL2_image}
+ {$linkframework SDL2_ttf}
+ {$linkframework SDL2_mixer}
+ {$ELSE}
+ {$linklib SDLmain}
+ {$PASCALMAINNAME SDL_main}
+ {$linkframework Cocoa}
+ {$linkframework OpenGL}
+ {$linkframework SDL}
+ {$linkframework SDL_net}
+ {$linkframework SDL_image}
+ {$linkframework SDL_ttf}
+ {$linkframework SDL_mixer}
+ {$ENDIF}
{$ENDIF}
{$ENDIF}
--- a/misc/libphyslayer/CMakeLists.txt Wed Nov 06 00:59:33 2013 +0400
+++ b/misc/libphyslayer/CMakeLists.txt Tue Nov 05 23:33:23 2013 +0100
@@ -5,6 +5,7 @@
else(${USESDL12})
find_package(SDL2 REQUIRED)
include_directories(${SDL2_INCLUDE_DIR})
+ set(SDL_LIBRARY ${SDL2_LIBRARY})
endif(${USESDL12})
include_directories(${PHYSFS_INCLUDE_DIR})
--- a/tools/CMakeLists.txt Wed Nov 06 00:59:33 2013 +0400
+++ b/tools/CMakeLists.txt Tue Nov 05 23:33:23 2013 +0100
@@ -8,12 +8,21 @@
if (APPLE)
find_package(Qt4 REQUIRED QUIET)
- find_package(SDL REQUIRED)
- find_package(SDL_image REQUIRED)
- find_package(SDL_net REQUIRED)
- find_package(SDL_ttf REQUIRED)
- find_package(SDL_mixer REQUIRED)
- find_package(OggVorbis REQUIRED)
+ if(${USESDL12})
+ find_package(SDL REQUIRED)
+ find_package(SDL_image REQUIRED)
+ find_package(SDL_net REQUIRED)
+ find_package(SDL_ttf REQUIRED)
+ find_package(SDL_mixer REQUIRED)
+ find_package(OggVorbis REQUIRED)
+ else(${USESDL12})
+ find_package(SDL2 REQUIRED)
+ find_package(SDL2_image REQUIRED)
+ find_package(SDL2_net REQUIRED)
+ find_package(SDL2_ttf REQUIRED)
+ find_package(SDL2_mixer REQUIRED)
+ endif(${USESDL12})
+
if(NOT NOAUTOUPDATE)
find_package(Sparkle) #needed for SPARKLE_FOUND variable
#needed because the 'if' clause in the script prints silly policy warnings