-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #332 from salvete/erofs-io-incremental
Add erofs-util API support for overlaybd
- Loading branch information
Showing
7 changed files
with
753 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
erofs-utils | ||
GIT_REPOSITORY https://gitee.com/anolis/erofs-utils.git | ||
GIT_TAG overlaybd-dev-2 | ||
) | ||
|
||
FetchContent_MakeAvailable(erofs-utils) | ||
|
||
execute_process( | ||
COMMAND ./autogen.sh | ||
WORKING_DIRECTORY ${erofs-utils_SOURCE_DIR} | ||
) | ||
execute_process( | ||
COMMAND ./configure --disable-lz4 --without-liblzma --without-libzstd | ||
WORKING_DIRECTORY ${erofs-utils_SOURCE_DIR} | ||
) | ||
execute_process( | ||
COMMAND make | ||
WORKING_DIRECTORY ${erofs-utils_SOURCE_DIR} | ||
) | ||
|
||
set(EROFS_LIB_INCLUDE_DIR "${erofs-utils_SOURCE_DIR}/include/" CACHE PATH "erofs-utils include path.") | ||
set(EROFS_CONFIG_FILE "${erofs-utils_SOURCE_DIR}/config.h" CACHE PATH "erofs-utils config file.") | ||
set(EROFS_LIB_STATIC "${erofs-utils_SOURCE_DIR}/lib/.libs/liberofs.a" CACHE PATH "erofs-utils static lib.") | ||
|
||
file(GLOB EROFS_SOURCE "*.cpp") | ||
|
||
add_library(erofs_lib STATIC ${EROFS_SOURCE}) | ||
|
||
target_include_directories(erofs_lib PRIVATE | ||
${PHOTON_INCLUDE_DIR} | ||
) | ||
|
||
target_include_directories(erofs_lib PRIVATE | ||
${EROFS_LIB_INCLUDE_DIR} | ||
) | ||
|
||
target_link_libraries(erofs_lib PRIVATE uuid) | ||
|
||
target_compile_options(erofs_lib PRIVATE "-include${EROFS_CONFIG_FILE}") | ||
target_link_libraries(erofs_lib PRIVATE ${EROFS_LIB_STATIC}) |
Oops, something went wrong.