share/CMakeLists.txt
branchwebgl
changeset 8330 aaefa587e277
parent 8096 453917e94e55
parent 8317 ec9f94ab2737
child 8833 c13ebed437cb
--- a/share/CMakeLists.txt	Sun Dec 02 00:03:16 2012 +0100
+++ b/share/CMakeLists.txt	Tue Dec 25 04:45:22 2012 +0100
@@ -1,13 +1,22 @@
 add_subdirectory(hedgewars)
 
-IF(APPLE OR CROSSAPPLE)
+if(APPLE)
     #needed for CFBundleVersion and CFBundleShortVersionString
         #should reuse the variables set in main CMakeLists.txt
-    IF(HGCOMMAND AND (EXISTS ${CMAKE_SOURCE_DIR}/.hg))
+    if(HGCOMMAND AND (EXISTS ${CMAKE_SOURCE_DIR}/.hg))
         set(HEDGEWARS_REVISION ${revision_number})
-    ELSE()
+    else()
         set(HEDGEWARS_REVISION ${HEDGEWARS_VERSION})
-    ENDIF()
+    endif()
+
+    #silly libav that always brings in VideoDecoderAcceleration, avaible only from 10.6.3
+    if(NOT NOVIDEOREC)
+        set(FFMPEG_FIND_QUIETLY true)
+        find_package(FFMPEG)
+        if(${FFMPEG_FOUND} AND ${minimum_macosx_version} VERSION_EQUAL "10.6")
+            set(minimum_macosx_version "10.6.3")
+        endif()
+    endif()
 
     configure_file(${hedgewars_SOURCE_DIR}/share/Info.plist.in
                    ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
@@ -20,4 +29,4 @@
             DESTINATION ../Resources/)
     install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/dsa_pub.pem"
             DESTINATION ../Resources/)
-ENDIF(APPLE OR CROSSAPPLE)
+endif(APPLE)