equal
deleted
inserted
replaced
100 endif (APPLE) |
100 endif (APPLE) |
101 endif(BUILD_ENGINE_LIBRARY) |
101 endif(BUILD_ENGINE_LIBRARY) |
102 |
102 |
103 |
103 |
104 #PASCAL DETECTION SECTION |
104 #PASCAL DETECTION SECTION |
105 IF(FPC) |
105 if(FPC) |
106 set(fpc_executable ${FPC}) |
106 set(fpc_executable ${FPC}) |
107 ELSE() |
107 else() |
108 find_program(fpc_executable fpc) |
108 find_program(fpc_executable fpc) |
109 ENDIF() |
109 endif() |
110 |
110 |
111 message(STATUS "Check for working FPC compiler: ${fpc_executable}") |
111 message(STATUS "Check for working FPC compiler: ${fpc_executable}") |
112 execute_process(COMMAND ${fpc_executable} -iV OUTPUT_VARIABLE fpc_output ERROR_VARIABLE fpc_error) |
112 execute_process(COMMAND ${fpc_executable} -iV OUTPUT_VARIABLE fpc_output ERROR_VARIABLE fpc_error) |
113 if(fpc_error) |
113 if(fpc_error) |
114 message(STATUS "Check for working FPC compiler: ${fpc_executable} -- broken") |
114 message(STATUS "Check for working FPC compiler: ${fpc_executable} -- broken") |
239 |
239 |
240 set(pascal_flags "-Fl${LIBRARY_OUTPUT_PATH}" ${pascal_flags}) |
240 set(pascal_flags "-Fl${LIBRARY_OUTPUT_PATH}" ${pascal_flags}) |
241 |
241 |
242 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project}) |
242 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project}) |
243 |
243 |
244 IF(NOT APPLE) |
244 if(NOT APPLE) |
245 #here is the command for standard executables or for shared library |
245 #here is the command for standard executables or for shared library |
246 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" |
246 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" |
247 COMMAND "${fpc_executable}" |
247 COMMAND "${fpc_executable}" |
248 ARGS ${fpc_flags} |
248 ARGS ${fpc_flags} |
249 MAIN_DEPENDENCY ${hwengine_project} |
249 MAIN_DEPENDENCY ${hwengine_project} |
250 DEPENDS ${engine_sources} |
250 DEPENDS ${engine_sources} |
251 ) |
251 ) |
252 ELSE() |
252 else() |
253 #these are the dependencies for building a universal binary on Mac OS X |
253 #these are the dependencies for building a universal binary on Mac OS X |
254 foreach (build_arch ${powerpc_build} ${i386_build} ${x86_64_build}) |
254 foreach (build_arch ${powerpc_build} ${i386_build} ${x86_64_build}) |
255 set(lipo_args_list "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" ${lipo_args_list}) |
255 set(lipo_args_list "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" ${lipo_args_list}) |
256 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" |
256 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" |
257 COMMAND "${fpc_executable}" |
257 COMMAND "${fpc_executable}" |
265 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" |
265 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" |
266 COMMAND "lipo" |
266 COMMAND "lipo" |
267 ARGS ${lipo_args_list} -create -output ${EXECUTABLE_OUTPUT_PATH}/${engine_output_name} |
267 ARGS ${lipo_args_list} -create -output ${EXECUTABLE_OUTPUT_PATH}/${engine_output_name} |
268 DEPENDS ${lipo_args_list} |
268 DEPENDS ${lipo_args_list} |
269 ) |
269 ) |
270 ENDIF() |
270 endif() |
271 |
271 |
272 |
272 |
273 add_custom_target(${engine_output_name} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}") |
273 add_custom_target(${engine_output_name} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}") |
274 |
274 |
275 #when system Lua is not found we need to compile it before engine |
275 #when system Lua is not found we need to compile it before engine |