Skip to content

Commit a406be3

Browse files
committed
Fetch libappimage with FetchContent
1 parent a6cd281 commit a406be3

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@
1010
[submodule "lib/--force"]
1111
path = lib/--force
1212
url = https://github.com/arsenm/sanitizers-cmake
13-
[submodule "lib/libappimage"]
14-
path = lib/libappimage
15-
url = https://github.com/AppImage/libappimage.git

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ option(USE_SYSTEM_LIBAPPIMAGE OFF "Use existing libappimage installed on system
5252
if(USE_SYSTEM_LIBAPPIMAGE)
5353
# note: find_package calls must be made in the same or a parent scope
5454
find_package(libappimage REQUIRED)
55+
else()
56+
function(import_libappimage)
57+
include(FetchContent)
58+
59+
FetchContent_Declare(libappimage
60+
GIT_REPOSITORY https://github.com/AppImageCommunity/libappimage
61+
GIT_TAG 3467b20
62+
)
63+
FetchContent_MakeAvailable(libappimage)
64+
endfunction()
65+
66+
import_libappimage()
5567
endif()
5668

5769
option(BUILD_QT_UI OFF "Build Qt UI (widget library and demo application)")

lib/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
if(NOT USE_SYSTEM_ZSYNC2)
22
add_subdirectory(zsync2 EXCLUDE_FROM_ALL)
33
endif()
4-
5-
if(NOT USE_SYSTEM_LIBAPPIMAGE)
6-
add_subdirectory(libappimage EXCLUDE_FROM_ALL)
7-
endif()

lib/libappimage

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)