CMakeLists.txt
changeset 8686 d303da4568b7
parent 8683 45a976bf9ca4
child 8687 5b6ad1bd6ace
equal deleted inserted replaced
8685:c0e54583296e 8686:d303da4568b7
    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 [default: off]" OFF)
    23 option(NOPNG "Disable screenshoot compression [default: auto]" OFF)
    23 option(NOPNG "Disable screenshoot compression [default: off]" OFF)
    24 option(NOVIDEOREC "Disable video recording [default: off]" OFF)
    24 option(NOVIDEOREC "Disable video recording [default: 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 [default:off]" OFF)
    28 
    28 
   280                              )
   280                              )
   281     list(APPEND haskell_flags "-w"                # no warnings
   281     list(APPEND haskell_flags "-w"                # no warnings
   282                               )
   282                               )
   283 endif()
   283 endif()
   284 
   284 
       
   285 include(${CMAKE_MODULE_PATH}/utils.cmake)
   285 
   286 
   286 #lua discovery
   287 #lua discovery
   287 find_package(Lua)
   288 find_package(Lua)
   288 if(LUA_FOUND)
   289 if(LUA_FOUND)
   289     message(STATUS "Found LUA: ${LUA_DEFAULT}")
   290     message(STATUS "Found LUA: ${LUA_DEFAULT}")
   329     #(should be harmless on other platforms)
   330     #(should be harmless on other platforms)
   330     list(APPEND pascal_flags "-XLAphysfs=${physfs_output_name}" "-dPHYSFS_INTERNAL")
   331     list(APPEND pascal_flags "-XLAphysfs=${physfs_output_name}" "-dPHYSFS_INTERNAL")
   331 endif()
   332 endif()
   332 
   333 
   333 if(NOT NOVIDEOREC)
   334 if(NOT NOVIDEOREC)
   334     find_package(FFMPEG)
   335     find_package_or_disable(FFMPEG NOVIDEOREC)
   335     if(NOT ${FFMPEG_FOUND})
   336 else()
   336         message(FATAL_ERROR "Missing FFMPEG/Libav! Rerun cmake with -DNOVIDEOREC=on to disable video recording")
   337     message(STATUS "Video recording disabled")
   337     endif()
       
   338 else()
       
   339     set(FFMPEG_FOUND false)
   338     set(FFMPEG_FOUND false)
   340 endif()
   339 endif()
   341 
   340 
   342 #physfs helper library
   341 #physfs helper library
   343 add_subdirectory(misc/libphyslayer)
   342 add_subdirectory(misc/libphyslayer)