mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00

it has to solve a few problems like: 1. blocking the current thread while listing, extracting or adding to archive 2. lack of support for some archive formats such as 7-zip in the previously available classes for dealing with archive 3. progress and error reporting a KArchiveJob class may have to be implemented to solve the above issues. the API is just as frustrating to use as KTar and KZip right now tho and I am not happy with that but the class itself is a 3-rd rewrite of what was once Python module, plugin for another project and now used as base in library. Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
45 lines
897 B
CMake
45 lines
897 B
CMake
if(LibArchive_FOUND)
|
|
include_directories(${LibArchive_INCLUDE_DIRS})
|
|
add_definitions(-DHAVE_LIBARCHIVE)
|
|
endif()
|
|
|
|
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=51009)
|
|
|
|
set(karchive_LIB_SRCS
|
|
karchive.cpp
|
|
)
|
|
|
|
add_library(karchive ${LIBRARY_TYPE} ${karchive_LIB_SRCS})
|
|
|
|
target_link_libraries(karchive PUBLIC
|
|
${KDE4_KDECORE_LIBS}
|
|
)
|
|
|
|
if(LibArchive_FOUND)
|
|
target_link_libraries(karchive PRIVATE ${LibArchive_LIBRARIES})
|
|
endif()
|
|
|
|
set_target_properties(karchive PROPERTIES
|
|
VERSION ${GENERIC_LIB_VERSION}
|
|
SOVERSION ${GENERIC_LIB_SOVERSION}
|
|
)
|
|
|
|
generate_export_header(karchive)
|
|
|
|
install(
|
|
FILES
|
|
${CMAKE_CURRENT_BINARY_DIR}/karchive_export.h
|
|
karchive.h
|
|
DESTINATION ${KDE4_INCLUDE_INSTALL_DIR}
|
|
COMPONENT Devel
|
|
)
|
|
|
|
install(
|
|
TARGETS karchive
|
|
EXPORT kdelibsLibraryTargets
|
|
${INSTALL_TARGETS_DEFAULT_ARGS}
|
|
)
|
|
|
|
if(ENABLE_TESTING)
|
|
add_subdirectory(tests)
|
|
endif()
|