equal
deleted
inserted
replaced
185 endif() |
185 endif() |
186 else() |
186 else() |
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 |
|
191 |
|
192 #this command is a workaround to some inlining issues present in older |
|
193 # FreePascal versions and fixed in 2.6, That version is mandatory on OSX, |
|
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") |
|
197 endif() |
|
198 |
|
199 |
190 if(NOT NO_VIDEOREC) |
200 if(NOT NO_VIDEOREC) |
191 if(${FFMPEG_FOUND}) |
201 if(${FFMPEG_FOUND}) |
192 message(STATUS "Compiling with video recording") |
202 message(STATUS "Compiling with video recording") |
193 include_directories(${FFMPEG_INCLUDE_DIR}) |
203 include_directories(${FFMPEG_INCLUDE_DIR}) |
194 set(pascal_flags "-dUSE_VIDEO_RECORDING" ${pascal_flags}) |
204 set(pascal_flags "-dUSE_VIDEO_RECORDING" ${pascal_flags}) |
201 ELSE() |
211 ELSE() |
202 add_library(avwrapper STATIC avwrapper.c) |
212 add_library(avwrapper STATIC avwrapper.c) |
203 set(pascal_flags "-k${FFMPEG_LIBAVCODEC}" "-k${FFMPEG_LIBAVFORMAT}" "-k${FFMPEG_LIBAVUTIL}" ${pascal_flags}) |
213 set(pascal_flags "-k${FFMPEG_LIBAVCODEC}" "-k${FFMPEG_LIBAVFORMAT}" "-k${FFMPEG_LIBAVUTIL}" ${pascal_flags}) |
204 # set(pascal_flags "-k${LIBRARY_OUTPUT_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}avwrapper${CMAKE_STATIC_LIBRARY_SUFFIX}" ${pascal_flags}) |
214 # set(pascal_flags "-k${LIBRARY_OUTPUT_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}avwrapper${CMAKE_STATIC_LIBRARY_SUFFIX}" ${pascal_flags}) |
205 ENDIF() |
215 ENDIF() |
|
216 if(NOT APPLE) |
|
217 add_dependencies(avwrapper ENGINECLEAN) |
|
218 endif() |
206 else() |
219 else() |
207 message(STATUS "FFMPEG library not found, video recording will be disabled") |
220 message(STATUS "FFMPEG library not found, video recording will be disabled") |
208 endif() |
221 endif() |
209 else() |
222 else() |
210 message(STATUS "Video recording disabled by user") |
223 message(STATUS "Video recording disabled by user") |
246 #when system Lua is not found we need to compile it before engine |
259 #when system Lua is not found we need to compile it before engine |
247 if(NOT LUA_FOUND) |
260 if(NOT LUA_FOUND) |
248 add_dependencies(${engine_output_name} lua) |
261 add_dependencies(${engine_output_name} lua) |
249 endif() |
262 endif() |
250 |
263 |
251 #this command is a workaround to some inlining issues present in older |
|
252 # FreePascal versions and fixed in 2.6, That version is mandatory on OSX, |
|
253 # hence the command is not needed there |
|
254 if(NOT APPLE) |
264 if(NOT APPLE) |
255 add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars") |
|
256 if(NO_VIDEOREC OR NOT ${FFMPEG_FOUND}) |
265 if(NO_VIDEOREC OR NOT ${FFMPEG_FOUND}) |
257 add_dependencies(${engine_output_name} ENGINECLEAN) |
266 add_dependencies(${engine_output_name} ENGINECLEAN) |
258 else() |
|
259 add_dependencies(avwrapper ENGINECLEAN) |
|
260 endif() |
267 endif() |
261 endif() |
268 endif() |
262 |
269 |
263 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) |
270 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) |