Update archiving libs and their linking
This commit is contained in:
10
3rdParty/CMakeLists.txt
vendored
10
3rdParty/CMakeLists.txt
vendored
@@ -29,3 +29,13 @@ execute_process(
|
||||
|
||||
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}/deps/INSTALL)
|
||||
endif()
|
||||
|
||||
function(LinkLibArchive TARGET)
|
||||
find_package(LibArchive REQUIRED)
|
||||
set(ZLIB_USE_STATIC_LIBS ON)
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(LZ4 REQUIRED)
|
||||
find_package(zstd REQUIRED)
|
||||
target_include_directories(${TARGET} PRIVATE ${LibArchive_INCLUDE_DIR})
|
||||
target_link_libraries(${TARGET} PRIVATE ${LibArchive_LIBRARIES} ${ZLIB_LIBRARIES} ${zstd_LIBRARIES} ${LZ4_LIBRARIES})
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user