Files
libarchive/unzip/CMakeLists.txt
T
Tobias Stoeckmann 2615ba5cd5 libarchive_fe: Import FreeBSD's fnmatch
If system lacks fnmatch(3), use FreeBSD's fnmatch. It's adjusted for
increased compatibility, i.e. it uses strcoll instead of FreeBSD's
library internals and const char pointers where needed with latest
GNU/Linux toolchains.

FreeBSD source can be obtained here:

https://github.com/freebsd/freebsd-src/blob/dc36d6f9bb1753f3808552f3afd30eda9a7b206a/lib/libc/gen/fnmatch.c

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2026-06-22 20:32:23 +02:00

50 lines
1.3 KiB
CMake

#
# SPDX-License-Identifier: BSD-2-Clause
#
############################################
#
# How to build bsdunzip
#
############################################
IF(ENABLE_UNZIP)
SET(bsdunzip_SOURCES
bsdunzip.c
bsdunzip.h
bsdunzip_platform.h
cmdline.c
la_queue.h
../libarchive_fe/lafe_err.c
../libarchive_fe/lafe_err.h
../libarchive_fe/lafe_fnmatch.c
../libarchive_fe/lafe_fnmatch.h
../libarchive_fe/lafe_getline.c
../libarchive_fe/lafe_getline.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
IF(ENABLE_INSTALL)
INSTALL(TARGETS bsdunzip RUNTIME DESTINATION bin)
INSTALL_MAN(${bsdunzip_MANS})
ENDIF(ENABLE_INSTALL)
ENDIF(ENABLE_UNZIP)
add_subdirectory(test)