From: Tobias Markus Date: Sun, 8 Mar 2015 23:32:15 +0000 (+0100) Subject: Fix patch application (again) X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=55f545ee5562e4c660425e2b3dc44072e5c94395;p=supertux.git Fix patch application (again) --- diff --git a/external/squirrel/CMakeLists.txt b/external/squirrel/CMakeLists.txt index 4a2afad0d..17615274f 100644 --- a/external/squirrel/CMakeLists.txt +++ b/external/squirrel/CMakeLists.txt @@ -22,6 +22,7 @@ ## 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) @@ -33,7 +34,7 @@ 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)