avwrapper needs to depend on hwengine not on ENGINECLEAN 0.9.18
authorkoda
Sun, 04 Nov 2012 15:45:45 +0100
branch0.9.18
changeset 7942 17b3937de37b
parent 7940 d5e49cf042d9
child 7944 a94f4ef5ba2b
avwrapper needs to depend on hwengine not on ENGINECLEAN
hedgewars/CMakeLists.txt
--- a/hedgewars/CMakeLists.txt	Sun Nov 04 15:43:32 2012 +0100
+++ b/hedgewars/CMakeLists.txt	Sun Nov 04 15:45:45 2012 +0100
@@ -219,9 +219,6 @@
             add_library(avwrapper STATIC avwrapper.c)
             set(pascal_flags "-k${FFMPEG_LIBAVCODEC}" "-k${FFMPEG_LIBAVFORMAT}" "-k${FFMPEG_LIBAVUTIL}" ${pascal_flags})
         ENDIF()
-        if(fpc_version LESS "020600")
-            add_dependencies(avwrapper ENGINECLEAN)
-        endif()
     else()
         message(STATUS "Could NOT find FFMPEG/LibAV, video recording will be disabled")
     endif()
@@ -267,6 +264,12 @@
     add_dependencies(${engine_output_name} lua)
 endif()
 
+#when ffmpeg/libav is found we need to compile it before engine
+#TODO: convert avwrapper to .pas unit so we can skip this
+if(${FFMPEG_FOUND})
+    add_dependencies(${engine_output_name} avwrapper)
+endif()
+
 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
 if((fpc_version LESS "020600") AND (NOVIDEOREC OR NOT ${FFMPEG_FOUND}))
     add_dependencies(${engine_output_name} ENGINECLEAN)