55 #add again files for external functions and for fpcrtl_ functions |
55 #add again files for external functions and for fpcrtl_ functions |
56 list(APPEND engine_sources_pas ${CMAKE_SOURCE_DIR}/hedgewars/pas2cSystem.pas) |
56 list(APPEND engine_sources_pas ${CMAKE_SOURCE_DIR}/hedgewars/pas2cSystem.pas) |
57 list(APPEND engine_sources_pas ${CMAKE_SOURCE_DIR}/hedgewars/pas2cRedo.pas) |
57 list(APPEND engine_sources_pas ${CMAKE_SOURCE_DIR}/hedgewars/pas2cRedo.pas) |
58 |
58 |
59 |
59 |
|
60 set(pas2c_args -n hwengine |
|
61 -i ${CMAKE_SOURCE_DIR}/hedgewars |
|
62 -o ${CMAKE_CURRENT_BINARY_DIR} |
|
63 -a ${CMAKE_CURRENT_BINARY_DIR} |
|
64 -d ENDIAN_LITTLE |
|
65 -d DEBUGFILE) |
|
66 if(BUILD_ENGINE_JS) |
|
67 set(pas2c_args ${pas2c_args} -d WEBGL) |
|
68 endif() |
|
69 |
60 #invoke pas2c on main module, it will call all the others |
70 #invoke pas2c on main module, it will call all the others |
61 add_custom_command(OUTPUT ${engine_sources} |
71 add_custom_command(OUTPUT ${engine_sources} |
62 COMMAND "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}" |
72 COMMAND "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}" |
63 ARGS -n "hwengine" |
73 ARGS ${pas2c_args} |
64 -i "${CMAKE_SOURCE_DIR}/hedgewars" |
|
65 -o "${CMAKE_CURRENT_BINARY_DIR}" |
|
66 -a "${CMAKE_CURRENT_BINARY_DIR}" |
|
67 -d "ENDIAN_LITTLE" |
|
68 -d "DEBUGFILE" |
|
69 DEPENDS pas2c #converter tool |
74 DEPENDS pas2c #converter tool |
70 ${engine_sources_pas} #original pascal file |
75 ${engine_sources_pas} #original pascal file |
71 ) |
76 ) |
72 |
77 |
73 #wrap conversion for all source in this command |
78 #wrap conversion for all source in this command |