--- 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}
--- 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
)