237 DEPENDS ${lipo_args_list} |
237 DEPENDS ${lipo_args_list} |
238 ) |
238 ) |
239 endif() |
239 endif() |
240 |
240 |
241 |
241 |
242 add_custom_target(${engine_output_name} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}") |
242 add_custom_target(hwengine ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}") |
243 |
243 |
244 #when system Lua is not found we need to compile it before engine |
244 #when system Lua is not found we need to compile it before engine |
245 if(NOT LUA_FOUND) |
245 if(NOT LUA_FOUND) |
246 add_dependencies(${engine_output_name} lua) |
246 add_dependencies(hwengine lua) |
247 endif() |
247 endif() |
248 |
248 |
249 # compile physfs before engine |
249 # compile physfs before engine |
250 add_dependencies(${engine_output_name} physfs) |
250 add_dependencies(hwengine physfs) |
251 |
251 |
252 #when ffmpeg/libav is found we need to compile it before engine |
252 #when ffmpeg/libav is found we need to compile it before engine |
253 #TODO: convert avwrapper to .pas unit so we can skip this step |
253 #TODO: convert avwrapper to .pas unit so we can skip this step |
254 if(${FFMPEG_FOUND}) |
254 if(${FFMPEG_FOUND}) |
255 add_dependencies(${engine_output_name} avwrapper) |
255 add_dependencies(hwengine avwrapper) |
256 endif() |
256 endif() |
257 |
257 |
258 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 |
258 #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 |
259 if((FPC_VERSION VERSION_LESS "2.6") AND (NOVIDEOREC OR NOT ${FFMPEG_FOUND})) |
259 if((FPC_VERSION VERSION_LESS "2.6") AND (NOVIDEOREC OR NOT ${FFMPEG_FOUND})) |
260 add_dependencies(${engine_output_name} ENGINECLEAN) |
260 add_dependencies(hwengine ENGINECLEAN) |
261 endif() |
261 endif() |
262 |
262 |
263 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" DESTINATION ${destination_dir}) |
263 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" DESTINATION ${destination_dir}) |