equal
deleted
inserted
replaced
187 message(STATUS "PNG screenshots disabled per user request, using BMP format") |
187 message(STATUS "PNG screenshots disabled per user request, using BMP format") |
188 endif() |
188 endif() |
189 |
189 |
190 |
190 |
191 |
191 |
192 #this command is a workaround to some inlining issues present in older |
192 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 |
193 # FreePascal versions and fixed in 2.6, That version is mandatory on OSX, |
193 if(fpc_version LESS "020600") |
194 # hence the command is not needed there |
|
195 if(NOT APPLE) |
|
196 add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars") |
194 add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars") |
197 endif() |
195 endif() |
198 |
196 |
199 |
197 |
200 if(NOT NO_VIDEOREC) |
198 if(NOT NO_VIDEOREC) |
211 ELSE() |
209 ELSE() |
212 add_library(avwrapper STATIC avwrapper.c) |
210 add_library(avwrapper STATIC avwrapper.c) |
213 set(pascal_flags "-k${FFMPEG_LIBAVCODEC}" "-k${FFMPEG_LIBAVFORMAT}" "-k${FFMPEG_LIBAVUTIL}" ${pascal_flags}) |
211 set(pascal_flags "-k${FFMPEG_LIBAVCODEC}" "-k${FFMPEG_LIBAVFORMAT}" "-k${FFMPEG_LIBAVUTIL}" ${pascal_flags}) |
214 # set(pascal_flags "-k${LIBRARY_OUTPUT_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}avwrapper${CMAKE_STATIC_LIBRARY_SUFFIX}" ${pascal_flags}) |
212 # set(pascal_flags "-k${LIBRARY_OUTPUT_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}avwrapper${CMAKE_STATIC_LIBRARY_SUFFIX}" ${pascal_flags}) |
215 ENDIF() |
213 ENDIF() |
216 if(NOT APPLE) |
214 if(fpc_version LESS "020600") |
217 add_dependencies(avwrapper ENGINECLEAN) |
215 add_dependencies(avwrapper ENGINECLEAN) |
218 endif() |
216 endif() |
219 else() |
217 else() |
220 message(STATUS "FFMPEG library not found, video recording will be disabled") |
218 message(STATUS "FFMPEG library not found, video recording will be disabled") |
221 endif() |
219 endif() |
259 #when system Lua is not found we need to compile it before engine |
257 #when system Lua is not found we need to compile it before engine |
260 if(NOT LUA_FOUND) |
258 if(NOT LUA_FOUND) |
261 add_dependencies(${engine_output_name} lua) |
259 add_dependencies(${engine_output_name} lua) |
262 endif() |
260 endif() |
263 |
261 |
264 #fpc < 2.6 has a few bugs in updating inline functions, so we have to compile all engine every time as workaround |
262 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 |
265 if(fpc_version LESS "020600") |
263 if(fpc_version LESS "020600") |
266 if(NO_VIDEOREC OR NOT ${FFMPEG_FOUND}) |
264 if(NO_VIDEOREC OR NOT ${FFMPEG_FOUND}) |
267 add_dependencies(${engine_output_name} ENGINECLEAN) |
265 add_dependencies(${engine_output_name} ENGINECLEAN) |
268 endif() |
266 endif() |
269 endif() |
267 endif() |