--- /dev/null
+--- a/scripts/genout.cmake.in
++++ b/scripts/genout.cmake.in
+@@ -14,6 +14,7 @@ set(BINDIR "@CMAKE_CURRENT_BINARY_DIR@")
+
+ set(AWK "@AWK@")
+ set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
++set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
+ set(CMAKE_C_FLAGS @CMAKE_C_FLAGS@)
+ set(INCDIR "@CMAKE_CURRENT_BINARY_DIR@")
+ set(PNG_PREFIX "@PNG_PREFIX@")
+@@ -58,7 +59,7 @@ if ("${INPUTEXT}" STREQUAL ".c" AND "${OUTPUTEXT}" STREQUAL ".out")
+ set(PNG_PREFIX_DEF "-DPNG_PREFIX=${PNG_PREFIX}")
+ endif()
+
+- execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E"
++ execute_process(COMMAND "${CMAKE_C_COMPILER}" ${CMAKE_C_COMPILER_ARG1} "-E"
+ ${CMAKE_C_FLAGS}
+ ${PLATFORM_C_FLAGS}
+ "-I${SRCDIR}"