cmake: Adjust linker lines with sdl2 names sdl2transition
authorkoda
Sat, 14 Nov 2015 03:00:41 +0100
branchsdl2transition
changeset 11377 ee86941e2ade
parent 11376 5375b9168fc2
child 11378 cef3fef64c93
cmake: Adjust linker lines with sdl2 names
hedgewars/CMakeLists.txt
--- a/hedgewars/CMakeLists.txt	Sat Nov 14 02:59:49 2015 +0100
+++ b/hedgewars/CMakeLists.txt	Sat Nov 14 03:00:41 2015 +0100
@@ -135,11 +135,11 @@
     add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kOpenGL")
 
     #set the correct library or framework style depending on the main SDL
-    string(FIND "${SDL_LIBRARY}" "dylib" sdl_framework)
+    string(FIND "${SDL2_LIBRARY}" "dylib" sdl_framework)
     if(${sdl_framework} GREATER -1)
-        add_flag_append(CMAKE_Pascal_FLAGS "-k-lsdl -k-lsdl_image -k-lsdl_mixer -k-lsdl_ttf -k-lsdl_net")
+        add_flag_append(CMAKE_Pascal_FLAGS "-k-lsdl2 -k-lsdl2_image -k-lsdl2_mixer -k-lsdl2_ttf -k-lsdl2_net")
     else()
-        add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kSDL -k-framework -kSDL_image -k-framework -kSDL_mixer -k-framework -kSDL_net -k-framework -kSDL_net -k-framework -kSDL_ttf")
+        add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kSDL2 -k-framework -kSDL2_image -k-framework -kSDL2_mixer -k-framework -kSDL2_net -k-framework -kSDL2_net -k-framework -kSDL2_ttf")
     endif()
 endif()