blob: 6434791f788f58e6a18d4efcba727fbe68a11801 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
############################################
#
# How to build bsdtar
#
############################################
IF(ENABLE_TAR)
SET(bsdtar_SOURCES
bsdtar.c
bsdtar.h
bsdtar_platform.h
cmdline.c
creation_set.c
read.c
subst.c
util.c
write.c
../libarchive_fe/err.c
../libarchive_fe/err.h
../libarchive_fe/lafe_platform.h
../libarchive_fe/line_reader.c
../libarchive_fe/line_reader.h
../libarchive_fe/passphrase.c
../libarchive_fe/passphrase.h
)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libarchive_fe)
IF(WIN32 AND NOT CYGWIN)
LIST(APPEND bsdtar_SOURCES bsdtar_windows.c)
LIST(APPEND bsdtar_SOURCES bsdtar_windows.h)
ENDIF(WIN32 AND NOT CYGWIN)
# bsdtar documentation
SET(bsdtar_MANS bsdtar.1)
# How to build bsdtar
ADD_EXECUTABLE(bsdtar ${bsdtar_SOURCES})
IF(ENABLE_TAR_SHARED)
TARGET_LINK_LIBRARIES(bsdtar archive ${ADDITIONAL_LIBS})
ELSE(ENABLE_TAR_SHARED)
TARGET_LINK_LIBRARIES(bsdtar archive_static ${ADDITIONAL_LIBS})
SET_TARGET_PROPERTIES(bsdtar PROPERTIES COMPILE_DEFINITIONS
LIBARCHIVE_STATIC)
ENDIF(ENABLE_TAR_SHARED)
# Installation rules
INSTALL(TARGETS bsdtar RUNTIME DESTINATION bin)
INSTALL_MAN(${bsdtar_MANS})
ENDIF(ENABLE_TAR)
add_subdirectory(test)
|