Files
src/unzip/CMakeLists.txt
T
Martin Matuska 70968ea087 Update vendor/libarchive to libarchive/libarchive@0e1e2b926
Important bugfixes (relevant to FreeBSD):
  ISSUE #1934: stack buffer overflow in cpio verbose mode
  ISSUE #1935: SEGV in cpio verbose mode
  PR #1731 tar: respect --strip-components and -s patterns in cru modes

Obtained from:		libarchive
Libarchive commit:	0e1e2b926aad81512a79a05c791b9dc7e0fa8715
Libarchive tag:		v3.7.1
2023-07-29 20:19:08 +02:00

40 lines
1.1 KiB
CMake

############################################
#
# How to build bsdunzip
#
############################################
IF(ENABLE_UNZIP)
SET(bsdunzip_SOURCES
bsdunzip.c
bsdunzip_platform.h
la_getline.c
la_queue.h
../libarchive_fe/err.c
../libarchive_fe/err.h
../libarchive_fe/lafe_platform.h
../libarchive_fe/passphrase.c
../libarchive_fe/passphrase.h
)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libarchive_fe)
# bsdunzip documentation
SET(bsdunzip_MANS bsdunzip.1)
# How to build bsdunzip
ADD_EXECUTABLE(bsdunzip ${bsdunzip_SOURCES})
IF(ENABLE_UNZIP_SHARED)
TARGET_LINK_LIBRARIES(bsdunzip archive ${ADDITIONAL_LIBS})
ELSE(ENABLE_UNZIP_SHARED)
TARGET_LINK_LIBRARIES(bsdunzip archive_static ${ADDITIONAL_LIBS})
SET_TARGET_PROPERTIES(bsdunzip PROPERTIES COMPILE_DEFINITIONS
LIBARCHIVE_STATIC)
ENDIF(ENABLE_UNZIP_SHARED)
# Installation rules
INSTALL(TARGETS bsdunzip RUNTIME DESTINATION bin)
INSTALL_MAN(${bsdunzip_MANS})
ENDIF(ENABLE_UNZIP)
add_subdirectory(test)