include(FetchContent) FetchContent_Declare( libarchive GIT_REPOSITORY https://github.com/libarchive/libarchive.git GIT_TAG v3.5.1 GIT_SHALLOW TRUE ) set(ENABLE_TEST OFF) set(ENABLE_TAR OFF) set(ENABLE_CPIO OFF) set(ENABLE_CAT OFF) set(ENABLE_OPENSSL OFF) FetchContent_MakeAvailable(libarchive)