if this doesn't work I shall cry like a lady
authorsheepluva
Sun, 02 Sep 2012 22:27:01 +0200
changeset 7655 b993257902d3
parent 7654 e07580669a3e
child 7656 e7bef1a4fda7
if this doesn't work I shall cry like a lady
hedgewars/CMakeLists.txt
--- a/hedgewars/CMakeLists.txt	Sun Sep 02 22:09:06 2012 +0200
+++ b/hedgewars/CMakeLists.txt	Sun Sep 02 22:27:01 2012 +0200
@@ -187,6 +187,16 @@
     message(STATUS "PNG screenshots disabled per user request, using BMP format")
 endif()
 
+
+
+#this command is a workaround to some inlining issues present in older
+# FreePascal versions and fixed in 2.6, That version is mandatory on OSX,
+# hence the command is not needed there
+if(NOT APPLE)
+    add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars")
+endif()
+
+
 if(NOT NO_VIDEOREC)
     if(${FFMPEG_FOUND})
         message(STATUS "Compiling with video recording")
@@ -203,6 +213,9 @@
             set(pascal_flags "-k${FFMPEG_LIBAVCODEC}" "-k${FFMPEG_LIBAVFORMAT}" "-k${FFMPEG_LIBAVUTIL}" ${pascal_flags})
          #   set(pascal_flags "-k${LIBRARY_OUTPUT_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}avwrapper${CMAKE_STATIC_LIBRARY_SUFFIX}" ${pascal_flags})
         ENDIF()
+        if(NOT APPLE)
+            add_dependencies(avwrapper ENGINECLEAN)
+        endif()
     else()
         message(STATUS "FFMPEG library not found, video recording will be disabled")
     endif()
@@ -248,15 +261,9 @@
     add_dependencies(${engine_output_name} lua)
 endif()
 
-#this command is a workaround to some inlining issues present in older
-# FreePascal versions and fixed in 2.6, That version is mandatory on OSX,
-# hence the command is not needed there
 if(NOT APPLE)
-    add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars")
     if(NO_VIDEOREC OR NOT ${FFMPEG_FOUND})
         add_dependencies(${engine_output_name} ENGINECLEAN)
-    else()
-        add_dependencies(avwrapper ENGINECLEAN)
     endif()
 endif()