Skip to content

Commit

Permalink
Install e2fsdroid and ext2simg
Browse files Browse the repository at this point in the history
  • Loading branch information
munix9 authored and Johnnynator committed Jan 15, 2022
1 parent 8d839f8 commit 68de701
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
29 changes: 29 additions & 0 deletions vendor/CMakeLists.mke2fs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,32 @@ target_link_libraries("${ANDROID_MKE2FS_NAME}"
libext2fs libsparse libbase libzip liblog libutil Threads::Threads z)
target_include_directories("${ANDROID_MKE2FS_NAME}" PRIVATE
e2fsprogs/lib)

add_executable(e2fsdroid
e2fsprogs/contrib/android/e2fsdroid.c
e2fsprogs/contrib/android/basefs_allocator.c
e2fsprogs/contrib/android/block_range.c
e2fsprogs/contrib/android/base_fs.c
e2fsprogs/contrib/android/fsmap.c
e2fsprogs/contrib/android/block_list.c
e2fsprogs/contrib/android/perms.c)

include(CheckIncludeFile)
CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)

if(HAVE_SYS_TYPES_H)
target_compile_definitions(e2fsdroid PUBLIC HAVE_SYS_TYPES_H)
endif(HAVE_SYS_TYPES_H)

target_link_libraries(e2fsdroid
libext2fs libsparse libzip libcutils liblog libutil libbase libselinux libsepol z pcre2-8 pthread)
target_include_directories(e2fsdroid PRIVATE
e2fsprogs/lib e2fsprogs/lib/ext2fs selinux/libselinux/include core/libcutils/include e2fsprogs/misc)

add_executable(ext2simg
e2fsprogs/contrib/android/ext2simg.c)

target_link_libraries(ext2simg
libext2fs libsparse libbase libzip liblog libutil z pthread)
target_include_directories(ext2simg PRIVATE
e2fsprogs/lib core/libsparse/include)
2 changes: 2 additions & 0 deletions vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ install(TARGETS
lpmake
lpunpack
simg2img
e2fsdroid
ext2simg
DESTINATION bin)

# Install common completion files.
Expand Down

0 comments on commit 68de701

Please sign in to comment.