hedgewars/CMakeLists.txt
changeset 9650 1c7c87ce37fd
parent 9339 14f5f3a1e2f7
child 9668 75aab6802a2e
equal deleted inserted replaced
9649:2d30721b1a11 9650:1c7c87ce37fd
     1 find_package(SDL)
     1 find_package(SDL1or2)
     2 find_package(SDL_image)
     2 find_package(SDL_image)
     3 find_package(SDL_net)
     3 find_package(SDL_net)
     4 find_package(SDL_ttf)
     4 find_package(SDL_ttf)
     5 find_package(SDL_mixer)
     5 find_package(SDL_mixer)
     6 
     6 
   156 check_library_exists(${SDLIMAGE_LIBRARY} IMG_Init "" HAVE_IMGINIT)
   156 check_library_exists(${SDLIMAGE_LIBRARY} IMG_Init "" HAVE_IMGINIT)
   157 if(HAVE_IMGINIT)
   157 if(HAVE_IMGINIT)
   158     add_definitions(-dSDL_IMAGE_NEWER)
   158     add_definitions(-dSDL_IMAGE_NEWER)
   159 endif(HAVE_IMGINIT)
   159 endif(HAVE_IMGINIT)
   160 
   160 
       
   161 if(NOT (SDL_VERSION VERSION_LESS 2.0))
       
   162     add_definitions(-dSDL2)
       
   163 endif()
       
   164 
   161 #needs to be last
   165 #needs to be last
   162 add_definitions(-dDEBUGFILE)
   166 add_definitions(-dDEBUGFILE)
   163 
   167 
   164 #SOURCE AND PROGRAMS SECTION
   168 #SOURCE AND PROGRAMS SECTION
   165 if(BUILD_ENGINE_LIBRARY)
   169 if(BUILD_ENGINE_LIBRARY)