CMakeLists.txt
changeset 8686 d303da4568b7
parent 8683 45a976bf9ca4
child 8687 5b6ad1bd6ace
--- a/CMakeLists.txt	Thu Mar 07 10:11:07 2013 +0100
+++ b/CMakeLists.txt	Thu Mar 07 10:14:12 2013 +0100
@@ -19,8 +19,8 @@
 
 
 #possible cmake configuration
-option(NOSERVER "Disable gameServer build [default: auto]" OFF)
-option(NOPNG "Disable screenshoot compression [default: auto]" OFF)
+option(NOSERVER "Disable gameServer build [default: off]" OFF)
+option(NOPNG "Disable screenshoot compression [default: off]" OFF)
 option(NOVIDEOREC "Disable video recording [default: off]" OFF)
 
 #set this to ON when 2.1.0 becomes more widespread (and only for linux)
@@ -282,6 +282,7 @@
                               )
 endif()
 
+include(${CMAKE_MODULE_PATH}/utils.cmake)
 
 #lua discovery
 find_package(Lua)
@@ -331,11 +332,9 @@
 endif()
 
 if(NOT NOVIDEOREC)
-    find_package(FFMPEG)
-    if(NOT ${FFMPEG_FOUND})
-        message(FATAL_ERROR "Missing FFMPEG/Libav! Rerun cmake with -DNOVIDEOREC=on to disable video recording")
-    endif()
+    find_package_or_disable(FFMPEG NOVIDEOREC)
 else()
+    message(STATUS "Video recording disabled")
     set(FFMPEG_FOUND false)
 endif()