Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make LZMA support optional #114

Open
wants to merge 1 commit into
base: Omega
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})

find_package(Kodi REQUIRED)
find_package(LibArchive REQUIRED)
find_package(LibLZMA REQUIRED)
find_package(LibLZMA)
find_package(BZip2 REQUIRED)
find_package(ZLIB REQUIRED)
find_package(LZ4 REQUIRED)
Expand All @@ -14,7 +14,6 @@ find_package(OpenSSL REQUIRED)

include_directories(${KODI_INCLUDE_DIR}/..
${LibArchive_INCLUDE_DIRS}
${LIBLZMA_INCLUDE_DIRS}
${BZIP2_INCLUDE_DIR}
${ZLIB_INCLUDE_DIRS}
${LZ4_INCLUDE_DIRS}
Expand All @@ -24,13 +23,17 @@ include_directories(${KODI_INCLUDE_DIR}/..
set(ARCHIVE_SOURCES src/ArchiveFile.cpp)

set(DEPLIBS ${LibArchive_LIBRARIES}
${LIBLZMA_LIBRARIES}
${BZIP2_LIBRARIES}
${OPENSSL_LIBRARIES}
${ZLIB_LIBRARIES}
${LZ4_LIBRARIES}
${LZO2_LIBRARIES})

if(LibLZMA_FOUND)
include_directories(${LIBLZMA_INCLUDE_DIRS})
heitbaum marked this conversation as resolved.
Show resolved Hide resolved
list(APPEND DEPLIBS ${LIBLZMA_LIBRARIES})
endif()

add_definitions(-DLIBARCHIVE_STATIC -D_CRT_NONSTDC_NO_DEPRECATE)

build_addon(vfs.libarchive ARCHIVE DEPLIBS)
Expand Down