CMakeLists.txt
changeset 7981 6d538bc1b395
parent 7977 5272ae8fccd7
child 7999 2c9aedfba740
equal deleted inserted replaced
7980:3122e7af0bf5 7981:6d538bc1b395
    93     set(DARWIN TRUE)
    93     set(DARWIN TRUE)
    94   elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*")
    94   elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*")
    95     set(MACOSX TRUE)
    95     set(MACOSX TRUE)
    96   endif()
    96   endif()
    97   # TODO: iOS?
    97   # TODO: iOS?
    98 elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*|BeOS.*")
    98 elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*")
    99   set(BEOS TRUE)
    99   message_error("BeOS support has been removed as of SDL 2.0.2.")
       
   100 elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*")
       
   101   set(HAIKU TRUE)
   100 endif()
   102 endif()
   101 
   103 
   102 # Don't mistake osx for unix
   104 # Don't mistake osx for unix
   103 if(UNIX AND NOT APPLE)
   105 if(UNIX AND NOT APPLE)
   104   set(UNIX_SYS ON)
   106   set(UNIX_SYS ON)
   306   endif(HAVE_GCC_FVISIBILITY)
   308   endif(HAVE_GCC_FVISIBILITY)
   307   set(CMAKE_REQUIRED_FLAGS)
   309   set(CMAKE_REQUIRED_FLAGS)
   308 
   310 
   309   check_c_compiler_flag(-Wall HAVE_GCC_WALL)
   311   check_c_compiler_flag(-Wall HAVE_GCC_WALL)
   310   if(HAVE_GCC_WALL)
   312   if(HAVE_GCC_WALL)
   311     if(CMAKE_SYSTEM_NAME MATCHES "Haiku|BeOS")
   313     if(HAIKU)
   312       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar")
   314       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar")
   313     endif(CMAKE_SYSTEM_NAME MATCHES "Haiku|BeOS")
   315     endif(HAIKU)
   314   endif(HAVE_GCC_WALL)
   316   endif(HAVE_GCC_WALL)
   315 endif(USE_GCC)
   317 endif(USE_GCC)
   316 
   318 
   317 if(ASSEMBLY)
   319 if(ASSEMBLY)
   318   if(USE_GCC OR USE_CLANG)
   320   if(USE_GCC OR USE_CLANG)
   989       set(HAVE_VIDEO_OPENGL TRUE)
   991       set(HAVE_VIDEO_OPENGL TRUE)
   990     endif(VIDEO_OPENGL)
   992     endif(VIDEO_OPENGL)
   991   endif(SDL_VIDEO)
   993   endif(SDL_VIDEO)
   992 
   994 
   993   CheckPTHREAD()
   995   CheckPTHREAD()
   994 elseif(BEOS)
   996 elseif(HAIKU)
   995   if(SDL_VIDEO)
   997   if(SDL_VIDEO)
   996     set(SDL_VIDEO_DRIVER_BWINDOW 1)
   998     set(SDL_VIDEO_DRIVER_HAIKU 1)
   997     file(GLOB BWINDOW_SOURCES ${SDL2_SOURCE_DIR}/src/video/bwindow/*.c)
   999     file(GLOB HAIKUVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/haiku/*.c)
   998     set(SOURCE_FILES ${SOURCE_FILES} ${BWINDOW_SOURCES})
  1000     set(SOURCE_FILES ${SOURCE_FILES} ${HAIKUVIDEO_SOURCES})
   999     set(HAVE_SDL_VIDEO TRUE)
  1001     set(HAVE_SDL_VIDEO TRUE)
  1000 
  1002 
  1001     set(SDL_FILESYSTEM_BEOS 1)
  1003     set(SDL_FILESYSTEM_HAIKU 1)
  1002     file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/beos/*.cc)
  1004     file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/haiku/*.cc)
  1003     set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
  1005     set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
  1004     set(HAVE_SDL_FILESYSTEM TRUE)
  1006     set(HAVE_SDL_FILESYSTEM TRUE)
  1005 
  1007 
  1006     if(VIDEO_OPENGL)
  1008     if(VIDEO_OPENGL)
  1007       # TODO: Use FIND_PACKAGE(OpenGL) instead
  1009       # TODO: Use FIND_PACKAGE(OpenGL) instead