## Apply coverity patch to Squirrel?
SET(APPLY_COVERITY_PATCH TRUE)
SET(PATCH_COMMAND patch -p1 --forward -i)
+SET(WORKING_DIR WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
FIND_PROGRAM(PATCH_EXECUTABLE patch)
IF(PATCH_EXECUTABLE AND APPLY_COVERITY_PATCH)
# Execute patch files
FOREACH(file ${PATCH_FILES})
MESSAGE(STATUS "Found patch file ${file}.")
- EXECUTE_PROCESS(COMMAND ${PATCH_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/${file})
+ EXECUTE_PROCESS(COMMAND ${PATCH_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${WORKING_DIR})
ENDFOREACH(file)
ENDIF(PATCH_EXECUTABLE AND APPLY_COVERITY_PATCH)