hedgewars/CMakeLists.txt
branchsdl2transition
changeset 11360 7a7611adf715
parent 9798 f2b18754742f
child 11362 ed5a6478e710
--- a/hedgewars/CMakeLists.txt	Tue Dec 17 00:02:52 2013 +0400
+++ b/hedgewars/CMakeLists.txt	Tue Nov 10 17:45:14 2015 +0100
@@ -1,19 +1,10 @@
 enable_language(Pascal)
 
-if(${NOSDL2})
-    find_package(SDL REQUIRED)
-    find_package(SDL_image REQUIRED)
-    find_package(SDL_net REQUIRED)
-    find_package(SDL_ttf REQUIRED)
-    find_package(SDL_mixer REQUIRED)
-else(${NOSDL2})
-    find_package(SDL2 REQUIRED)
-    find_package(SDL2_image REQUIRED)
-    find_package(SDL2_net REQUIRED)
-    find_package(SDL2_ttf REQUIRED)
-    find_package(SDL2_mixer REQUIRED)
-    add_definitions(-dSDL2)
-endif(${NOSDL2})
+find_package(SDL2 REQUIRED)
+find_package(SDL2_image REQUIRED)
+find_package(SDL2_net REQUIRED)
+find_package(SDL2_ttf REQUIRED)
+find_package(SDL2_mixer REQUIRED)
 
 include (CheckLibraryExists)
 
@@ -107,24 +98,12 @@
 endif()
 
 
-#DEPENDECIES AND EXECUTABLES SECTION
-if(NOT ${BUILD_ENGINE_LIBRARY} AND APPLE AND ${NOSDL2})
-    #on OSX we need to provide the SDL_main() function when building as executable
-    add_subdirectory(sdlmain)
-    list(APPEND HW_LINK_LIBS SDLmain)
-    add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
-endif()
-
 if(FFMPEG_FOUND)
     add_subdirectory(avwrapper)
     list(APPEND HW_LINK_LIBS avwrapper)
     add_definitions(-dUSE_VIDEO_RECORDING)
     add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
     
-    if(${NOSDL2})
-        #only for SDL < 2, linking carried out by fpc
-        find_package_or_disable_msg(GLUT NOVIDEOREC "Video recording will not be built")
-    endif(${NOSDL2})
 endif()
 
 find_package_or_disable_msg(PNG NOPNG "Screenshots will be saved in BMP")
@@ -160,18 +139,6 @@
 list(APPEND HW_LINK_LIBS physlayer)
 
 #Mix_Init/Mix_Quit from SDL_mixer 1.2.10
-if(${NOSDL2})
-    check_library_exists(${SDLMIXER_LIBRARY} Mix_Init "" HAVE_MIXINIT)
-    if(HAVE_MIXINIT)
-        add_definitions(-dSDL_MIXER_NEWER)
-    endif(HAVE_MIXINIT)
-
-    #IMG_Init/IMG_Quit from SDL_image 1.2.8
-    check_library_exists(${SDLIMAGE_LIBRARY} IMG_Init "" HAVE_IMGINIT)
-    if(HAVE_IMGINIT)
-        add_definitions(-dSDL_IMAGE_NEWER)
-    endif(HAVE_IMGINIT)
-endif(${NOSDL2})
 
 #needs to be last
 add_definitions(-dDEBUGFILE)