CMakeLists.txt
changeset 8691 a59b35e3ad8f
parent 8688 88a6114a318c
child 8698 6714499ecdeb
equal deleted inserted replaced
8682:158d7b36b18e 8691:a59b35e3ad8f
    17 
    17 
    18 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")
    18 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")
    19 
    19 
    20 
    20 
    21 #possible cmake configuration
    21 #possible cmake configuration
    22 option(NOSERVER "Disable gameServer build [default: auto]" OFF)
    22 option(NOSERVER "Disable gameServer build (off)]" OFF)
    23 option(NOPNG "Disable screenshoot compression [default: auto]" OFF)
    23 option(NOPNG "Disable screenshoot compression (off)" OFF)
    24 option(NOVIDEOREC "Disable video recording [default: off]" OFF)
    24 option(NOVIDEOREC "Disable video recording (off)" OFF)
    25 
    25 
    26 #set this to ON when 2.1.0 becomes more widespread (and only for linux)
    26 #set this to ON when 2.1.0 becomes more widespread (and only for linux)
    27 option(SYSTEM_PHYSFS "Use system physfs [default:off]" OFF)
    27 option(SYSTEM_PHYSFS "Use system physfs (off)" OFF)
    28 
    28 
    29 option(BUILD_ENGINE_LIBRARY "Enable hwengine library [default: off]" OFF)
    29 option(BUILD_ENGINE_LIBRARY "Enable hwengine library (off)" OFF)
    30 option(ANDROID "Enable Android build [default: off]" OFF)
    30 option(ANDROID "Enable Android build (off)" OFF)
    31 option(MINIMAL_FLAGS "Respect system flags as much as possible [default: off]" OFF)
    31 
    32 if(APPLE)
    32 if(UNIX AND NOT APPLE)
       
    33     option(MINIMAL_FLAGS "Respect system flags as much as possible (off)" OFF)
       
    34 else()
    33     option(NOAUTOUPDATE "Disable OS X Sparkle update checking" OFF)
    35     option(NOAUTOUPDATE "Disable OS X Sparkle update checking" OFF)
    34 endif()
    36 endif()
    35 
    37 
    36 set(FPFLAGS "" CACHE STRING "Additional Freepascal flags")
    38 set(FPFLAGS "" CACHE STRING "Additional Freepascal flags")
    37 set(GHFLAGS "" CACHE STRING "Additional Haskell flags")
    39 set(GHFLAGS "" CACHE STRING "Additional Haskell flags")
   280                              )
   282                              )
   281     list(APPEND haskell_flags "-w"                # no warnings
   283     list(APPEND haskell_flags "-w"                # no warnings
   282                               )
   284                               )
   283 endif()
   285 endif()
   284 
   286 
       
   287 include(${CMAKE_MODULE_PATH}/utils.cmake)
   285 
   288 
   286 #lua discovery
   289 #lua discovery
   287 find_package(Lua)
   290 find_package(Lua)
   288 if(LUA_FOUND)
   291 if(LUA_FOUND)
   289     message(STATUS "Found LUA: ${LUA_DEFAULT}")
   292     message(STATUS "Found LUA: ${LUA_DEFAULT}")
   328     #we also have to pass PHYSFS_INTERNAL to satisfy windows runtime requirements
   331     #we also have to pass PHYSFS_INTERNAL to satisfy windows runtime requirements
   329     #(should be harmless on other platforms)
   332     #(should be harmless on other platforms)
   330     list(APPEND pascal_flags "-XLAphysfs=${physfs_output_name}" "-dPHYSFS_INTERNAL")
   333     list(APPEND pascal_flags "-XLAphysfs=${physfs_output_name}" "-dPHYSFS_INTERNAL")
   331 endif()
   334 endif()
   332 
   335 
   333 if(NOT ${NOVIDEOREC})
   336 find_package_or_disable_msg(FFMPEG NOVIDEOREC "Video recording will not be built")
   334     find_package(FFMPEG)
       
   335     if(NOT ${FFMPEG_FOUND})
       
   336         message(FATAL_ERROR "Missing FFMPEG/Libav! Rerun cmake with -DNOVIDEOREC=on to disable video recording")
       
   337     endif()
       
   338 else()
       
   339     set(FFMPEG_FOUND false)
       
   340 endif()
       
   341 
   337 
   342 #physfs helper library
   338 #physfs helper library
   343 add_subdirectory(misc/libphyslayer)
   339 add_subdirectory(misc/libphyslayer)
   344 
   340 
   345 #server
   341 #server