Fix patch application (again)
authorTobias Markus <tobbi.bugs@googlemail.com>
Sun, 8 Mar 2015 23:32:15 +0000 (00:32 +0100)
committerTobias Markus <tobbi.bugs@googlemail.com>
Sun, 8 Mar 2015 23:33:14 +0000 (00:33 +0100)
external/squirrel/CMakeLists.txt

index 4a2afad..1761527 100644 (file)
@@ -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)