mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Added FetchContent command to cmake so that patches are applied automatically to libarchive clone
This commit is contained in:
parent
c5d44eab37
commit
b4c64dac69
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,6 +1,3 @@
|
||||||
[submodule "oss-internship-2020/sapi_libarchive/libarchive"]
|
|
||||||
path = oss-internship-2020/libarchive/libarchive
|
|
||||||
url = https://github.com/libarchive/libarchive
|
|
||||||
[submodule "oss-internship-2020/openjpeg/openjpeg"]
|
[submodule "oss-internship-2020/openjpeg/openjpeg"]
|
||||||
path = oss-internship-2020/openjpeg/openjpeg
|
path = oss-internship-2020/openjpeg/openjpeg
|
||||||
url = https://github.com/uclouvain/openjpeg.git
|
url = https://github.com/uclouvain/openjpeg.git
|
||||||
|
|
|
@ -20,9 +20,16 @@ set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED 17)
|
set(CMAKE_CXX_STANDARD_REQUIRED 17)
|
||||||
|
|
||||||
# Build SAPI library
|
# Build SAPI library
|
||||||
set(SAPI_ROOT "" CACHE PATH "Path to the Sandboxed API source tree")
|
#set(SAPI_ROOT "" CACHE PATH "Path to the Sandboxed API source tree")
|
||||||
|
set(SAPI_ROOT "/usr/local/google/home/amedar/internship/sandboxed-api" CACHE PATH "Path to the Sandboxed API source tree")
|
||||||
|
|
||||||
add_subdirectory(libarchive)
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
libarchive
|
||||||
|
GIT_REPOSITORY https://github.com/libarchive/libarchive
|
||||||
|
PATCH_COMMAND cd libarchive && patch < ${CMAKE_SOURCE_DIR}/patches/header.patch && patch < ${CMAKE_SOURCE_DIR}/patches/archive_virtual.patch
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(libarchive)
|
||||||
|
|
||||||
add_subdirectory("${SAPI_ROOT}"
|
add_subdirectory("${SAPI_ROOT}"
|
||||||
"${CMAKE_BINARY_DIR}/sandboxed-api-build"
|
"${CMAKE_BINARY_DIR}/sandboxed-api-build"
|
||||||
|
@ -37,8 +44,8 @@ add_sapi_library(
|
||||||
FUNCTIONS ${FUNCTIONS_LIST}
|
FUNCTIONS ${FUNCTIONS_LIST}
|
||||||
|
|
||||||
INPUTS
|
INPUTS
|
||||||
libarchive/libarchive/archive.h
|
${CMAKE_BINARY_DIR}/_deps/libarchive-src/libarchive/archive.h
|
||||||
libarchive/libarchive/archive_entry.h
|
${CMAKE_BINARY_DIR}/_deps/libarchive-src/libarchive/archive_entry.h
|
||||||
|
|
||||||
LIBRARY archive_static
|
LIBRARY archive_static
|
||||||
LIBRARY_NAME Libarchive
|
LIBRARY_NAME Libarchive
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 34940ef6ea0b21d77cb501d235164ad88f19d40c
|
|
Loading…
Reference in New Issue
Block a user