CMakeLists.txt
changeset 9277 f0bd40782fc7
parent 9164 494876610c49
child 9278 8900afb78a19
     1.1 --- a/CMakeLists.txt	Sat Dec 13 13:20:19 2014 -0800
     1.2 +++ b/CMakeLists.txt	Sat Dec 13 02:33:52 2014 -0500
     1.3 @@ -2,7 +2,7 @@
     1.4    message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
     1.5  endif()
     1.6  
     1.7 -cmake_minimum_required(VERSION 2.6)
     1.8 +cmake_minimum_required(VERSION 2.8)
     1.9  project(SDL2 C)
    1.10  include(CheckFunctionExists)
    1.11  include(CheckLibraryExists)
    1.12 @@ -144,7 +144,7 @@
    1.13    if(USE_GCC OR USE_CLANG)
    1.14      set(CMAKE_C_FLAGS "-g -O3")
    1.15    endif()
    1.16 -else("$ENV{CFLAGS}" STREQUAL "")
    1.17 +else()
    1.18    set(CMAKE_C_FLAGS "$ENV{CFLAGS}")
    1.19    list(APPEND EXTRA_CFLAGS "$ENV{CFLAGS}")
    1.20  endif()
    1.21 @@ -161,7 +161,7 @@
    1.22        if(${flag_var} MATCHES "/MD")
    1.23          string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
    1.24        endif()
    1.25 -    endforeach(flag_var)
    1.26 +    endforeach()
    1.27    endif()
    1.28  endif()
    1.29  
    1.30 @@ -486,7 +486,7 @@
    1.31      set(SDL_ASSEMBLY_ROUTINES 1)
    1.32    endif()
    1.33  # TODO:
    1.34 -#else(ASSEMBLY)
    1.35 +#else()
    1.36  #  if(USE_GCC OR USE_CLANG)
    1.37  #    list(APPEND EXTRA_CFLAGS "-mno-sse" "-mno-sse2" "-mno-mmx")
    1.38  #  endif()
    1.39 @@ -518,7 +518,7 @@
    1.40      set(HAVE_M_PI 1)
    1.41      add_definitions(-D_USE_MATH_DEFINES) # needed for M_PI
    1.42      set(STDC_HEADERS 1)
    1.43 -  else(WINDOWS AND NOT MINGW)
    1.44 +  else()
    1.45      set(HAVE_LIBC TRUE)
    1.46      check_include_file(sys/types.h HAVE_SYS_TYPES_H)
    1.47      foreach(_HEADER
    1.48 @@ -571,7 +571,7 @@
    1.49  
    1.50      check_struct_has_member("struct sigaction" "sa_sigaction" "signal.h" HAVE_SA_SIGACTION)
    1.51    endif()
    1.52 -else(LIBC)
    1.53 +else()
    1.54    if(WINDOWS)
    1.55      set(HAVE_STDARG_H 1)
    1.56      set(HAVE_STDDEF_H 1)
    1.57 @@ -752,7 +752,7 @@
    1.58      if(FOUND_CLOCK_GETTIME)
    1.59        list(APPEND EXTRA_LIBS rt)
    1.60        set(HAVE_CLOCK_GETTIME 1)
    1.61 -    else(FOUND_CLOCK_GETTIME)
    1.62 +    else()
    1.63        check_library_exists(c clock_gettime "" FOUND_CLOCK_GETTIME)
    1.64        if(FOUND_CLOCK_GETTIME)
    1.65          set(HAVE_CLOCK_GETTIME 1)
    1.66 @@ -1193,14 +1193,14 @@
    1.67    if(SDL_STATIC)
    1.68      set(ENABLE_STATIC_TRUE "")
    1.69      set(ENABLE_STATIC_FALSE "#")
    1.70 -  else(SDL_STATIC)
    1.71 +  else()
    1.72      set(ENABLE_STATIC_TRUE "#")
    1.73      set(ENABLE_STATIC_FALSE "")
    1.74    endif()
    1.75    if(SDL_SHARED)
    1.76      set(ENABLE_SHARED_TRUE "")
    1.77      set(ENABLE_SHARED_FALSE "#")
    1.78 -  else(SDL_SHARED)
    1.79 +  else()
    1.80      set(ENABLE_SHARED_TRUE "#")
    1.81      set(ENABLE_SHARED_FALSE "")
    1.82    endif()
    1.83 @@ -1281,7 +1281,7 @@
    1.84        VERSION ${LT_VERSION}
    1.85        SOVERSION ${LT_REVISION}
    1.86        OUTPUT_NAME "SDL2-${LT_RELEASE}")
    1.87 -  else(UNIX)
    1.88 +  else()
    1.89      set_target_properties(SDL2 PROPERTIES
    1.90        VERSION ${SDL_VERSION}
    1.91        SOVERSION ${LT_REVISION}
    1.92 @@ -1330,7 +1330,7 @@
    1.93    if(FREEBSD)
    1.94      # FreeBSD uses ${PREFIX}/libdata/pkgconfig
    1.95      install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "libdata/pkgconfig")
    1.96 -  else(FREEBSD)
    1.97 +  else()
    1.98      install(FILES ${SDL2_BINARY_DIR}/sdl2.pc
    1.99        DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
   1.100    endif()