|
1 |
| -# >= 3.2 required for ExternalProject_Add_StepDependencies |
2 |
| -cmake_minimum_required(VERSION 3.2) |
3 |
| - |
4 |
| - |
5 |
| -include(${PROJECT_SOURCE_DIR}/lib/libappimage/cmake/scripts.cmake) |
| 1 | +# >= 3.11 required for FetchContent |
| 2 | +cmake_minimum_required(VERSION 3.11) |
| 3 | + |
| 4 | +include(FetchContent) |
| 5 | + |
| 6 | +# Need this patch until https://github.com/AppImage/libappimage/pull/160 is resolved |
| 7 | +FetchContent_Declare(libappimage_patch |
| 8 | + URL https://github.com/AppImage/libappimage/commit/b3398bb496e47947864b4b8bc2999c8427f86a9a.patch |
| 9 | + DOWNLOAD_NO_EXTRACT TRUE |
| 10 | +) |
| 11 | +FetchContent_MakeAvailable(libappimage_patch) |
| 12 | + |
| 13 | +FetchContent_Declare(libappimage |
| 14 | + # We can not use a URL source with a github-generated source archive: libappimage's gtest submodule would be missing |
| 15 | + GIT_REPOSITORY https://github.com/AppImage/libappimage |
| 16 | + GIT_TAG 1d4d57622de2c7d39f7cc6c4980144c713cc59ca # latest as of 2022-04-03 |
| 17 | + # The patch command has || true to prevent the build from failing if the patch has already been applied |
| 18 | + PATCH_COMMAND patch -p 1 < ${libappimage_patch_SOURCE_DIR}/b3398bb496e47947864b4b8bc2999c8427f86a9a.patch || true |
| 19 | +) |
| 20 | +FetchContent_MakeAvailable(libappimage) |
| 21 | +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${libappimage_SOURCE_DIR}/cmake) |
| 22 | +include(${libappimage_SOURCE_DIR}/cmake/scripts.cmake) |
| 23 | +include(${libappimage_SOURCE_DIR}/cmake/tools.cmake) |
6 | 24 |
|
7 | 25 |
|
8 | 26 | # the names of the targets need to differ from the library filenames
|
@@ -52,9 +70,10 @@ if(NOT USE_SYSTEM_MKSQUASHFS)
|
52 | 70 |
|
53 | 71 | ExternalProject_Add(mksquashfs
|
54 | 72 | GIT_REPOSITORY https://github.com/plougher/squashfs-tools/
|
55 |
| - GIT_TAG 4.4 |
| 73 | + GIT_TAG 4.5.1 |
56 | 74 | UPDATE_COMMAND "" # Make sure CMake won't try to fetch updates unnecessarily and hence rebuild the dependency every time
|
57 | 75 | CONFIGURE_COMMAND ${SED} -i "s|CFLAGS += -DXZ_SUPPORT|CFLAGS += ${mksquashfs_cflags}|g" <SOURCE_DIR>/squashfs-tools/Makefile
|
| 76 | + COMMAND ${SED} -i "/INSTALL_MANPAGES_DIR/d" <SOURCE_DIR>/squashfs-tools/Makefile |
58 | 77 | COMMAND ${SED} -i "s|LIBS += -llzma|LIBS += -Bstatic ${mksquashfs_ldflags}|g" <SOURCE_DIR>/squashfs-tools/Makefile
|
59 | 78 | COMMAND ${SED} -i "s|install: mksquashfs unsquashfs|install: mksquashfs|g" squashfs-tools/Makefile
|
60 | 79 | COMMAND ${SED} -i "/cp unsquashfs/d" squashfs-tools/Makefile
|
|
0 commit comments