Skip to content

Commit

Permalink
Fetch libappimage with FetchContent
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Mar 4, 2023
1 parent a6cd281 commit a406be3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
[submodule "lib/--force"]
path = lib/--force
url = https://github.com/arsenm/sanitizers-cmake
[submodule "lib/libappimage"]
path = lib/libappimage
url = https://github.com/AppImage/libappimage.git
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ option(USE_SYSTEM_LIBAPPIMAGE OFF "Use existing libappimage installed on system
if(USE_SYSTEM_LIBAPPIMAGE)
# note: find_package calls must be made in the same or a parent scope
find_package(libappimage REQUIRED)
else()
function(import_libappimage)
include(FetchContent)

FetchContent_Declare(libappimage
GIT_REPOSITORY https://github.com/AppImageCommunity/libappimage
GIT_TAG 3467b20
)
FetchContent_MakeAvailable(libappimage)
endfunction()

import_libappimage()
endif()

option(BUILD_QT_UI OFF "Build Qt UI (widget library and demo application)")
Expand Down
4 changes: 0 additions & 4 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if(NOT USE_SYSTEM_ZSYNC2)
add_subdirectory(zsync2 EXCLUDE_FROM_ALL)
endif()

if(NOT USE_SYSTEM_LIBAPPIMAGE)
add_subdirectory(libappimage EXCLUDE_FROM_ALL)
endif()
1 change: 0 additions & 1 deletion lib/libappimage
Submodule libappimage deleted from 3467b2

0 comments on commit a406be3

Please sign in to comment.