# HG changeset patch # User koda # Date 1348529246 -7200 # Node ID 19ade14ecc29c1509bc44f138253abcd66673cb8 # Parent 15f5d3cd35c6cadef84d11bfb92a1d493242982a forgot a few checks from rev f40c65ae3eab diff -r 15f5d3cd35c6 -r 19ade14ecc29 hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Tue Sep 25 01:02:21 2012 +0200 +++ b/hedgewars/CMakeLists.txt Tue Sep 25 01:27:26 2012 +0200 @@ -189,10 +189,8 @@ -#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) +#this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 +if(fpc_version LESS "020600") add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars") endif() @@ -213,7 +211,7 @@ 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) + if(fpc_version LESS "020600") add_dependencies(avwrapper ENGINECLEAN) endif() else() @@ -261,7 +259,7 @@ add_dependencies(${engine_output_name} lua) endif() -#fpc < 2.6 has a few bugs in updating inline functions, so we have to compile all engine every time as workaround +#this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 if(fpc_version LESS "020600") if(NO_VIDEOREC OR NOT ${FFMPEG_FOUND}) add_dependencies(${engine_output_name} ENGINECLEAN)