File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,29 @@ add_subdirectory(VCellMessaging)
216216
217217add_subdirectory (VCellZipUtils)
218218
219+
220+
221+
219222add_subdirectory (libzippp)
223+ # Path to the patch file
224+ set (PATCH_FILE "${CMAKE_SOURCE_DIR} /patches/libzippp_patch.diff" )
225+ # Path to the file to be patched
226+ set (FILE_TO_PATCH "${CMAKE_SOURCE_DIR} /libzippp/src/libzippp.cpp" )
227+ # Apply the patch
228+ add_custom_command (
229+ OUTPUT ${FILE_TO_PATCH}
230+ COMMAND ${CMAKE_COMMAND} -E echo "Applying patch to libzippp"
231+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE_TO_PATCH} ${FILE_TO_PATCH} .bak
232+ COMMAND ${CMAKE_COMMAND} -E touch ${FILE_TO_PATCH}
233+ COMMAND patch ${FILE_TO_PATCH} < ${PATCH_FILE}
234+ DEPENDS ${PATCH_FILE}
235+ COMMENT "Patching libzippp"
236+ )
237+ # Ensure the patch is applied before building the submodule
238+ add_custom_target (apply_patch ALL DEPENDS ${FILE_TO_PATCH} )
239+ add_dependencies (libzippp apply_patch)
240+
241+
220242
221243add_subdirectory (ExpressionParser)
222244
Original file line number Diff line number Diff line change 1+ diff --git a/src/libzippp.cpp b/src/libzippp.cpp
2+ index 37d9cd1..19e8fc2 100644
3+ --- a/src/libzippp.cpp
4+ +++ b/src/libzippp.cpp
5+ @@ -38,9 +38,7 @@
6+ #endif
7+
8+ #include <zip.h>
9+ - #include <errno.h>
10+ #include <fstream>
11+ - #include <memory>
12+
13+ #include "libzippp.h"
14+
You can’t perform that action at this time.
0 commit comments