tools/CMakeLists.txt
branchsdl2transition
changeset 9679 dfaa39674e1e
parent 9347 5b582d49358c
child 9703 966d180184b4
--- 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