# HG changeset patch # User koda # Date 1461262607 14400 # Node ID 7d483d400f8d206ace37d033329c22d8f5e91956 # Parent 64bb93e9b2b572bb4933c9e0d3b231e9cf227cd7 Correctly set WEBGL macro during pas2c conversion diff -r 64bb93e9b2b5 -r 7d483d400f8d hedgewars/options.inc --- a/hedgewars/options.inc Thu Apr 21 13:10:15 2016 -0400 +++ b/hedgewars/options.inc Thu Apr 21 14:16:47 2016 -0400 @@ -46,7 +46,7 @@ {$DEFINE USE_TOUCH_INTERFACE} {$ELSE} {$DEFINE USE_AM_NUMCOLUMN} - {$IFNDEF PAS2C} + {$IFNDEF WEBGL} {$DEFINE USE_S3D_RENDERING} {$ENDIF} {$ENDIF} diff -r 64bb93e9b2b5 -r 7d483d400f8d project_files/hwc/CMakeLists.txt --- a/project_files/hwc/CMakeLists.txt Thu Apr 21 13:10:15 2016 -0400 +++ b/project_files/hwc/CMakeLists.txt Thu Apr 21 14:16:47 2016 -0400 @@ -57,15 +57,20 @@ list(APPEND engine_sources_pas ${CMAKE_SOURCE_DIR}/hedgewars/pas2cRedo.pas) +set(pas2c_args -n hwengine + -i ${CMAKE_SOURCE_DIR}/hedgewars + -o ${CMAKE_CURRENT_BINARY_DIR} + -a ${CMAKE_CURRENT_BINARY_DIR} + -d ENDIAN_LITTLE + -d DEBUGFILE) +if(BUILD_ENGINE_JS) + set(pas2c_args ${pas2c_args} -d WEBGL) +endif() + #invoke pas2c on main module, it will call all the others add_custom_command(OUTPUT ${engine_sources} COMMAND "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}" - ARGS -n "hwengine" - -i "${CMAKE_SOURCE_DIR}/hedgewars" - -o "${CMAKE_CURRENT_BINARY_DIR}" - -a "${CMAKE_CURRENT_BINARY_DIR}" - -d "ENDIAN_LITTLE" - -d "DEBUGFILE" + ARGS ${pas2c_args} DEPENDS pas2c #converter tool ${engine_sources_pas} #original pascal file )