Fix libarchive linking on bsd based os
This commit is contained in:
10
3rdParty/libarchive/CMakeLists.txt
vendored
10
3rdParty/libarchive/CMakeLists.txt
vendored
@@ -28,6 +28,8 @@ function(LinkLibArchive TARGET)
|
||||
find_package(zstd QUIET)
|
||||
find_package(BZip2 QUIET)
|
||||
find_package(LibLZMA QUIET)
|
||||
find_package(LibXml2 QUIET)
|
||||
find_package(EXPAT QUIET)
|
||||
target_include_directories(${TARGET} PRIVATE ${LibArchive_INCLUDE_DIR})
|
||||
target_link_libraries(${TARGET} PRIVATE ${LibArchive_LIBRARIES} ${ZLIB_LIBRARIES} ${zstd_LIBRARIES} ${LZ4_LIBRARIES})
|
||||
if (BZIP2_LIBRARIES)
|
||||
@@ -36,4 +38,10 @@ function(LinkLibArchive TARGET)
|
||||
if (LIBLZMA_LIBRARIES)
|
||||
target_link_libraries(${TARGET} PRIVATE ${LIBLZMA_LIBRARIES})
|
||||
endif()
|
||||
endfunction()
|
||||
if (LibXml2_FOUND)
|
||||
target_link_libraries(${TARGET} PUBLIC ${LIBXML2_LIBRARIES})
|
||||
endif()
|
||||
if (EXPAT_FOUND)
|
||||
target_link_libraries(${TARGET} PUBLIC ${EXPAT_LIBRARIES})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user