File: CMakeLists.txt

package info (click to toggle)
libzip 0.10.1-1.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,496 kB
  • sloc: sh: 10,520; ansic: 5,689; makefile: 271
file content (121 lines) | stat: -rw-r--r-- 3,638 bytes parent folder | download
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
SET(MDOC3_PAGES
  libzip.mdoc
  zip_add.mdoc
  zip_add_dir.mdoc
  zip_close.mdoc
  zip_delete.mdoc
  zip_error_clear.mdoc
  zip_error_get.mdoc
  zip_error_get_sys_type.mdoc
  zip_error_to_str.mdoc
  zip_errors.mdoc
  zip_fclose.mdoc
  zip_fdopen.mdoc
  zip_file_strerror.mdoc
  zip_fopen.mdoc
  zip_fopen_encrypted.mdoc
  zip_fread.mdoc
  zip_get_archive_comment.mdoc
  zip_get_archive_flag.mdoc
  zip_get_file_comment.mdoc
  zip_get_file_extra.mdoc
  zip_get_name.mdoc
  zip_get_num_entries.mdoc
  zip_get_num_files.mdoc
  zip_name_locate.mdoc
  zip_open.mdoc
  zip_rename.mdoc
  zip_set_archive_comment.mdoc
  zip_set_archive_flag.mdoc
  zip_set_default_password.mdoc
  zip_set_file_comment.mdoc
  zip_set_file_extra.mdoc
  zip_source_buffer.mdoc
  zip_source_file.mdoc
  zip_source_filep.mdoc
  zip_source_free.mdoc
  zip_source_function.mdoc
  zip_source_zip.mdoc
  zip_stat.mdoc
  zip_stat_init.mdoc
  zip_unchange.mdoc
  zip_unchange_all.mdoc
  zip_unchange_archive.mdoc
)
SET(MDOC1_PAGES
  zipcmp.mdoc
  zipmerge.mdoc
  ziptorrent.mdoc
)
SET(MDOC_PAGES ${MDOC1_PAGES} ${MDOC3_PAGES})
STRING(REGEX REPLACE .mdoc "" MAN1_PAGES "${MDOC1_PAGES}")
STRING(REGEX REPLACE .mdoc "" MAN3_PAGES "${MDOC3_PAGES}")
SET(MAN_PAGES ${MAN1_PAGES} ${MAN3_PAGES})

IF(CMAKE_SYSTEM_NAME MATCHES BSD)
  SET(MANFMT mdoc)
ELSE(CMAKE_SYSTEM_NAME MATCHES BSD)
  SET(MANFMT man)
ENDif(CMAKE_SYSTEM_NAME MATCHES BSD)

# installation

SET(MAN_PATH man)

FOREACH(MAN_PAGE ${MAN1_PAGES})
  INSTALL(FILES ${MAN_PAGE}.${MANFMT} DESTINATION ${MAN_PATH}/man1
    RENAME ${MAN_PAGE}.1)
ENDFOREACH(MAN_PAGE ${PROGRAMS})
FOREACH(MAN_PAGE ${MAN3_PAGES})
  INSTALL(FILES ${MAN_PAGE}.${MANFMT} DESTINATION ${MAN_PATH}/man3
    RENAME ${MAN_PAGE}.3)
ENDFOREACH(MAN_PAGE ${PROGRAMS})
# XXX: usually symlinks, but I only know how to do this way
INSTALL(FILES zip_error_clear.${MANFMT} DESTINATION ${MAN_PATH}/man3
  RENAME zip_file_error_clear.3)
INSTALL(FILES zip_error_get.${MANFMT} DESTINATION ${MAN_PATH}/man3
  RENAME zip_file_error_get.3)
INSTALL(FILES zip_fopen.${MANFMT} DESTINATION ${MAN_PATH}/man3
  RENAME zip_fopen_index.3)
INSTALL(FILES zip_fopen_encrypted.${MANFMT} DESTINATION ${MAN_PATH}/man3
  RENAME zip_fopen_index_encrypted.3)
INSTALL(FILES zip_add.${MANFMT} DESTINATION ${MAN_PATH}/man3
  RENAME zip_replace.3)
INSTALL(FILES zip_stat.${MANFMT} DESTINATION ${MAN_PATH}/man3
  RENAME zip_stat_index.3)
INSTALL(FILES zip_file_strerror.${MANFMT} DESTINATION ${MAN_PATH}/man3
  RENAME zip_strerror.3)

# custom maintainer targets

#FOREACH(MAN ${MAN_PAGES})
#  ADD_CUSTOM_TARGET(${MAN}.man
#    DEPENDS ${MAN}.mdoc
#    COMMAND mdoc2man ${CMAKE_CURRENT_SOURCE_DIR}/${MAN}.mdoc > ${MAN}.new
#    COMMAND diff -I NiH ${MAN}.new ${CMAKE_CURRENT_SOURCE_DIR}/${MAN}.man || mv ${MAN}.new ${CMAKE_CURRENT_SOURCE_DIR}/${MAN}.man
#    COMMAND rm -f ${MAN}.new
#    COMMENT Updating man page ${MAN}.man
#    )
#  ADD_CUSTOM_TARGET(${MAN}.html
#    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${MAN}.mdoc
#    COMMAND nroff -mdoc2html ${CMAKE_CURRENT_SOURCE_DIR}/${MAN}.mdoc | sed -e "s,../html[0-9]/,," > ${MAN}.html
#    COMMENT Updating HTML page ${MAN}.html
#    )
#ENDFOREACH(MAN)

#STRING(REGEX REPLACE .mdoc .man MANDEPEND "${MDOC_PAGES}")
#ADD_CUSTOM_TARGET(update-man
#  DEPENDS ${MANDEPEND})

#STRING(REGEX REPLACE .mdoc .html HTMLDEPEND "${MDOC_PAGES}")
#ADD_CUSTOM_TARGET(update-html
#  DEPENDS ${HTMLDEPEND})

# XXX: strange error:
#[ 94%] zipcmp.html
#[ 97%] Built target zipcmp.html
#[ 97%] zipmerge.html
#[100%] Built target zipmerge.html
#make: don't know how to make zipcmp.html. Stop

# XXX: why are all the man pages rebuilt on a second 'make update-html'?