xref: /freebsd/contrib/libfido2/man/CMakeLists.txt (revision 60a517b66a69b8c011b04063ef63a938738719bd)
12ccfa855SEd Maste# Copyright (c) 2018-2022 Yubico AB. All rights reserved.
20afa8e06SEd Maste# Use of this source code is governed by a BSD-style
30afa8e06SEd Maste# license that can be found in the LICENSE file.
42ccfa855SEd Maste# SPDX-License-Identifier: BSD-2-Clause
50afa8e06SEd Maste
60afa8e06SEd Mastefind_program(MANDOC_PATH mandoc)
70afa8e06SEd Mastefind_program(GZIP_PATH gzip)
80afa8e06SEd Maste
90afa8e06SEd Mastemessage(STATUS "MANDOC_PATH: ${MANDOC_PATH}")
100afa8e06SEd Mastemessage(STATUS "GZIP_PATH: ${GZIP_PATH}")
110afa8e06SEd Maste
120afa8e06SEd Mastelist(APPEND MAN_SOURCES
130afa8e06SEd Maste	eddsa_pk_new.3
140afa8e06SEd Maste	es256_pk_new.3
152ccfa855SEd Maste	es384_pk_new.3
160afa8e06SEd Maste	fido2-assert.1
170afa8e06SEd Maste	fido2-cred.1
180afa8e06SEd Maste	fido2-token.1
190afa8e06SEd Maste	fido_init.3
200afa8e06SEd Maste	fido_assert_new.3
210afa8e06SEd Maste	fido_assert_allow_cred.3
220afa8e06SEd Maste	fido_assert_set_authdata.3
230afa8e06SEd Maste	fido_assert_verify.3
240afa8e06SEd Maste	fido_bio_dev_get_info.3
250afa8e06SEd Maste	fido_bio_enroll_new.3
260afa8e06SEd Maste	fido_bio_info_new.3
270afa8e06SEd Maste	fido_bio_template.3
280afa8e06SEd Maste	fido_cbor_info_new.3
290afa8e06SEd Maste	fido_cred_new.3
300afa8e06SEd Maste	fido_cred_exclude.3
310afa8e06SEd Maste	fido_credman_metadata_new.3
320afa8e06SEd Maste	fido_cred_set_authdata.3
330afa8e06SEd Maste	fido_cred_verify.3
340afa8e06SEd Maste	fido_dev_enable_entattest.3
350afa8e06SEd Maste	fido_dev_get_assert.3
360afa8e06SEd Maste	fido_dev_get_touch_begin.3
370afa8e06SEd Maste	fido_dev_info_manifest.3
380afa8e06SEd Maste	fido_dev_largeblob_get.3
390afa8e06SEd Maste	fido_dev_make_cred.3
400afa8e06SEd Maste	fido_dev_open.3
410afa8e06SEd Maste	fido_dev_set_io_functions.3
420afa8e06SEd Maste	fido_dev_set_pin.3
430afa8e06SEd Maste	fido_strerr.3
440afa8e06SEd Maste	rs256_pk_new.3
450afa8e06SEd Maste)
460afa8e06SEd Maste
470afa8e06SEd Mastelist(APPEND MAN_ALIAS
480afa8e06SEd Maste	eddsa_pk_new eddsa_pk_free
493e696dfbSEd Maste	eddsa_pk_new eddsa_pk_from_EVP_PKEY
500afa8e06SEd Maste	eddsa_pk_new eddsa_pk_from_ptr
510afa8e06SEd Maste	eddsa_pk_new eddsa_pk_to_EVP_PKEY
520afa8e06SEd Maste	es256_pk_new es256_pk_free
530afa8e06SEd Maste	es256_pk_new es256_pk_from_EC_KEY
54f540a430SEd Maste	es256_pk_new es256_pk_from_EVP_PKEY
550afa8e06SEd Maste	es256_pk_new es256_pk_from_ptr
560afa8e06SEd Maste	es256_pk_new es256_pk_to_EVP_PKEY
572ccfa855SEd Maste	es384_pk_new es384_pk_free
582ccfa855SEd Maste	es384_pk_new es384_pk_from_EC_KEY
592ccfa855SEd Maste	es384_pk_new es384_pk_from_EVP_PKEY
602ccfa855SEd Maste	es384_pk_new es384_pk_from_ptr
612ccfa855SEd Maste	es384_pk_new es384_pk_to_EVP_PKEY
622ccfa855SEd Maste	fido_assert_allow_cred fido_assert_empty_allow_list
630afa8e06SEd Maste	fido_assert_new fido_assert_authdata_len
640afa8e06SEd Maste	fido_assert_new fido_assert_authdata_ptr
65*60a517b6SEd Maste	fido_assert_new fido_assert_authdata_raw_len
66*60a517b6SEd Maste	fido_assert_new fido_assert_authdata_raw_ptr
670afa8e06SEd Maste	fido_assert_new fido_assert_blob_len
680afa8e06SEd Maste	fido_assert_new fido_assert_blob_ptr
690afa8e06SEd Maste	fido_assert_new fido_assert_clientdata_hash_len
700afa8e06SEd Maste	fido_assert_new fido_assert_clientdata_hash_ptr
710afa8e06SEd Maste	fido_assert_new fido_assert_count
720afa8e06SEd Maste	fido_assert_new fido_assert_flags
730afa8e06SEd Maste	fido_assert_new fido_assert_free
740afa8e06SEd Maste	fido_assert_new fido_assert_hmac_secret_len
750afa8e06SEd Maste	fido_assert_new fido_assert_hmac_secret_ptr
760afa8e06SEd Maste	fido_assert_new fido_assert_id_len
770afa8e06SEd Maste	fido_assert_new fido_assert_id_ptr
780afa8e06SEd Maste	fido_assert_new fido_assert_largeblob_key_len
790afa8e06SEd Maste	fido_assert_new fido_assert_largeblob_key_ptr
800afa8e06SEd Maste	fido_assert_new fido_assert_rp_id
810afa8e06SEd Maste	fido_assert_new fido_assert_sigcount
820afa8e06SEd Maste	fido_assert_new fido_assert_sig_len
830afa8e06SEd Maste	fido_assert_new fido_assert_sig_ptr
840afa8e06SEd Maste	fido_assert_new fido_assert_user_display_name
850afa8e06SEd Maste	fido_assert_new fido_assert_user_icon
860afa8e06SEd Maste	fido_assert_new fido_assert_user_id_len
870afa8e06SEd Maste	fido_assert_new fido_assert_user_id_ptr
880afa8e06SEd Maste	fido_assert_new fido_assert_user_name
893e696dfbSEd Maste	fido_assert_set_authdata fido_assert_set_authdata_raw
900afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_clientdata
910afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_clientdata_hash
920afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_count
930afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_extensions
940afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_hmac_salt
950afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_hmac_secret
960afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_rp
970afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_sig
980afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_up
990afa8e06SEd Maste	fido_assert_set_authdata fido_assert_set_uv
100*60a517b6SEd Maste	fido_assert_set_authdata fido_assert_set_winhello_appid
1010afa8e06SEd Maste	fido_bio_dev_get_info fido_bio_dev_enroll_begin
1020afa8e06SEd Maste	fido_bio_dev_get_info fido_bio_dev_enroll_cancel
1030afa8e06SEd Maste	fido_bio_dev_get_info fido_bio_dev_enroll_continue
1040afa8e06SEd Maste	fido_bio_dev_get_info fido_bio_dev_enroll_remove
1050afa8e06SEd Maste	fido_bio_dev_get_info fido_bio_dev_get_template_array
1060afa8e06SEd Maste	fido_bio_dev_get_info fido_bio_dev_set_template_name
1070afa8e06SEd Maste	fido_bio_enroll_new fido_bio_enroll_free
1080afa8e06SEd Maste	fido_bio_enroll_new fido_bio_enroll_last_status
1090afa8e06SEd Maste	fido_bio_enroll_new fido_bio_enroll_remaining_samples
1100afa8e06SEd Maste	fido_bio_info_new fido_bio_info_free
1110afa8e06SEd Maste	fido_bio_info_new fido_bio_info_max_samples
1120afa8e06SEd Maste	fido_bio_info_new fido_bio_info_type
1130afa8e06SEd Maste	fido_bio_template fido_bio_template_array_count
1140afa8e06SEd Maste	fido_bio_template fido_bio_template_array_free
1150afa8e06SEd Maste	fido_bio_template fido_bio_template_array_new
1160afa8e06SEd Maste	fido_bio_template fido_bio_template_free
1170afa8e06SEd Maste	fido_bio_template fido_bio_template_id_len
1180afa8e06SEd Maste	fido_bio_template fido_bio_template_id_ptr
1190afa8e06SEd Maste	fido_bio_template fido_bio_template_name
1200afa8e06SEd Maste	fido_bio_template fido_bio_template_new
1210afa8e06SEd Maste	fido_bio_template fido_bio_template_set_id
1220afa8e06SEd Maste	fido_bio_template fido_bio_template_set_name
1230afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_aaguid_len
1240afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_aaguid_ptr
1250afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_algorithm_cose
1260afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_algorithm_count
1270afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_algorithm_type
1282ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_certs_len
1292ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_certs_name_ptr
1302ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_certs_value_ptr
1310afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_extensions_len
1320afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_extensions_ptr
1330afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_free
1342ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_fwversion
1350afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_maxcredbloblen
1363e696dfbSEd Maste	fido_cbor_info_new fido_cbor_info_maxcredcntlst
1373e696dfbSEd Maste	fido_cbor_info_new fido_cbor_info_maxcredidlen
1382ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_maxlargeblob
1392ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_maxmsgsiz
1402ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_maxrpid_minpinlen
1412ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_minpinlen
1422ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_new_pin_required
1430afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_options_len
1440afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_options_name_ptr
1450afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_options_value_ptr
1460afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_protocols_len
1470afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_protocols_ptr
1482ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_rk_remaining
1490afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_transports_len
1500afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_transports_ptr
1512ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_uv_attempts
1522ccfa855SEd Maste	fido_cbor_info_new fido_cbor_info_uv_modality
1530afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_versions_len
1540afa8e06SEd Maste	fido_cbor_info_new fido_cbor_info_versions_ptr
1550afa8e06SEd Maste	fido_cbor_info_new fido_dev_get_cbor_info
1562ccfa855SEd Maste	fido_cred_exclude fido_cred_empty_exclude_list
157f540a430SEd Maste	fido_cred_new fido_cred_aaguid_len
158f540a430SEd Maste	fido_cred_new fido_cred_aaguid_ptr
159f540a430SEd Maste	fido_cred_new fido_cred_attstmt_len
160f540a430SEd Maste	fido_cred_new fido_cred_attstmt_ptr
1610afa8e06SEd Maste	fido_cred_new fido_cred_authdata_len
1620afa8e06SEd Maste	fido_cred_new fido_cred_authdata_ptr
1630afa8e06SEd Maste	fido_cred_new fido_cred_authdata_raw_len
1640afa8e06SEd Maste	fido_cred_new fido_cred_authdata_raw_ptr
1650afa8e06SEd Maste	fido_cred_new fido_cred_clientdata_hash_len
1660afa8e06SEd Maste	fido_cred_new fido_cred_clientdata_hash_ptr
1670afa8e06SEd Maste	fido_cred_new fido_cred_display_name
1680afa8e06SEd Maste	fido_cred_new fido_cred_flags
1690afa8e06SEd Maste	fido_cred_new fido_cred_fmt
1700afa8e06SEd Maste	fido_cred_new fido_cred_free
1710afa8e06SEd Maste	fido_cred_new fido_cred_id_len
1720afa8e06SEd Maste	fido_cred_new fido_cred_id_ptr
1730afa8e06SEd Maste	fido_cred_new fido_cred_largeblob_key_len
1740afa8e06SEd Maste	fido_cred_new fido_cred_largeblob_key_ptr
175f540a430SEd Maste	fido_cred_new fido_cred_pin_minlen
1760afa8e06SEd Maste	fido_cred_new fido_cred_prot
1770afa8e06SEd Maste	fido_cred_new fido_cred_pubkey_len
1780afa8e06SEd Maste	fido_cred_new fido_cred_pubkey_ptr
1790afa8e06SEd Maste	fido_cred_new fido_cred_rp_id
1800afa8e06SEd Maste	fido_cred_new fido_cred_rp_name
181f540a430SEd Maste	fido_cred_new fido_cred_sigcount
1820afa8e06SEd Maste	fido_cred_new fido_cred_sig_len
1830afa8e06SEd Maste	fido_cred_new fido_cred_sig_ptr
1840afa8e06SEd Maste	fido_cred_new fido_cred_type
1850afa8e06SEd Maste	fido_cred_new fido_cred_user_id_len
1860afa8e06SEd Maste	fido_cred_new fido_cred_user_id_ptr
187f540a430SEd Maste	fido_cred_new fido_cred_user_name
1880afa8e06SEd Maste	fido_cred_new fido_cred_x5c_len
1890afa8e06SEd Maste	fido_cred_new fido_cred_x5c_ptr
1903e696dfbSEd Maste	fido_cred_verify fido_cred_verify_self
1910afa8e06SEd Maste	fido_credman_metadata_new fido_credman_del_dev_rk
1920afa8e06SEd Maste	fido_credman_metadata_new fido_credman_get_dev_metadata
1930afa8e06SEd Maste	fido_credman_metadata_new fido_credman_get_dev_rk
1940afa8e06SEd Maste	fido_credman_metadata_new fido_credman_get_dev_rp
1950afa8e06SEd Maste	fido_credman_metadata_new fido_credman_metadata_free
1960afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rk
1970afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rk_count
1980afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rk_existing
1990afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rk_free
2000afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rk_new
2010afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rk_remaining
2020afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rp_count
2030afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rp_free
2040afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rp_id
2050afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rp_id_hash_len
2060afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rp_id_hash_ptr
2070afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rp_name
2080afa8e06SEd Maste	fido_credman_metadata_new fido_credman_rp_new
2090afa8e06SEd Maste	fido_credman_metadata_new fido_credman_set_dev_rk
210f540a430SEd Maste	fido_cred_set_authdata fido_cred_set_attstmt
2110afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_authdata_raw
2120afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_blob
2130afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_clientdata
2140afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_clientdata_hash
2150afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_extensions
2160afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_fmt
2170afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_id
218f540a430SEd Maste	fido_cred_set_authdata fido_cred_set_pin_minlen
2190afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_prot
2200afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_rk
2210afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_rp
2220afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_sig
2230afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_type
2240afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_user
2250afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_uv
2260afa8e06SEd Maste	fido_cred_set_authdata fido_cred_set_x509
2270afa8e06SEd Maste	fido_dev_enable_entattest fido_dev_toggle_always_uv
2280afa8e06SEd Maste	fido_dev_enable_entattest fido_dev_force_pin_change
2290afa8e06SEd Maste	fido_dev_enable_entattest fido_dev_set_pin_minlen
230f540a430SEd Maste	fido_dev_enable_entattest fido_dev_set_pin_minlen_rpid
2310afa8e06SEd Maste	fido_dev_get_touch_begin fido_dev_get_touch_status
2320afa8e06SEd Maste	fido_dev_info_manifest fido_dev_info_free
2330afa8e06SEd Maste	fido_dev_info_manifest fido_dev_info_manufacturer_string
2340afa8e06SEd Maste	fido_dev_info_manifest fido_dev_info_new
2350afa8e06SEd Maste	fido_dev_info_manifest fido_dev_info_path
2360afa8e06SEd Maste	fido_dev_info_manifest fido_dev_info_product
2370afa8e06SEd Maste	fido_dev_info_manifest fido_dev_info_product_string
2380afa8e06SEd Maste	fido_dev_info_manifest fido_dev_info_ptr
2393e696dfbSEd Maste	fido_dev_info_manifest fido_dev_info_set
2400afa8e06SEd Maste	fido_dev_info_manifest fido_dev_info_vendor
2410afa8e06SEd Maste	fido_dev_open fido_dev_build
2420afa8e06SEd Maste	fido_dev_open fido_dev_cancel
2430afa8e06SEd Maste	fido_dev_open fido_dev_close
2440afa8e06SEd Maste	fido_dev_open fido_dev_flags
2450afa8e06SEd Maste	fido_dev_open fido_dev_force_fido2
2460afa8e06SEd Maste	fido_dev_open fido_dev_force_u2f
2470afa8e06SEd Maste	fido_dev_open fido_dev_free
2483e696dfbSEd Maste	fido_dev_open fido_dev_has_pin
2493e696dfbSEd Maste	fido_dev_open fido_dev_has_uv
2500afa8e06SEd Maste	fido_dev_open fido_dev_is_fido2
2510afa8e06SEd Maste	fido_dev_open fido_dev_is_winhello
2520afa8e06SEd Maste	fido_dev_open fido_dev_major
2530afa8e06SEd Maste	fido_dev_open fido_dev_minor
2540afa8e06SEd Maste	fido_dev_open fido_dev_new
2553e696dfbSEd Maste	fido_dev_open fido_dev_new_with_info
2563e696dfbSEd Maste	fido_dev_open fido_dev_open_with_info
2570afa8e06SEd Maste	fido_dev_open fido_dev_protocol
2580afa8e06SEd Maste	fido_dev_open fido_dev_supports_cred_prot
2590afa8e06SEd Maste	fido_dev_open fido_dev_supports_credman
2603e696dfbSEd Maste	fido_dev_open fido_dev_supports_permissions
2610afa8e06SEd Maste	fido_dev_open fido_dev_supports_pin
2620afa8e06SEd Maste	fido_dev_open fido_dev_supports_uv
2630afa8e06SEd Maste	fido_dev_set_pin fido_dev_get_retry_count
2640afa8e06SEd Maste	fido_dev_set_pin fido_dev_get_uv_retry_count
2650afa8e06SEd Maste	fido_dev_set_pin fido_dev_reset
2663e696dfbSEd Maste	fido_dev_set_io_functions fido_dev_io_handle
2670afa8e06SEd Maste	fido_dev_set_io_functions fido_dev_set_sigmask
268f540a430SEd Maste	fido_dev_set_io_functions fido_dev_set_timeout
2693e696dfbSEd Maste	fido_dev_set_io_functions fido_dev_set_transport_functions
2700afa8e06SEd Maste	fido_dev_largeblob_get fido_dev_largeblob_set
2710afa8e06SEd Maste	fido_dev_largeblob_get fido_dev_largeblob_remove
2720afa8e06SEd Maste	fido_dev_largeblob_get fido_dev_largeblob_get_array
2730afa8e06SEd Maste	fido_dev_largeblob_get fido_dev_largeblob_set_array
2743e696dfbSEd Maste	fido_init fido_set_log_handler
2750afa8e06SEd Maste	rs256_pk_new rs256_pk_free
2760afa8e06SEd Maste	rs256_pk_new rs256_pk_from_ptr
277f540a430SEd Maste	rs256_pk_new rs256_pk_from_EVP_PKEY
2780afa8e06SEd Maste	rs256_pk_new rs256_pk_from_RSA
2790afa8e06SEd Maste	rs256_pk_new rs256_pk_to_EVP_PKEY
2800afa8e06SEd Maste)
2810afa8e06SEd Maste
2820afa8e06SEd Mastelist(LENGTH MAN_ALIAS MAN_ALIAS_LEN)
2830afa8e06SEd Mastemath(EXPR MAN_ALIAS_MAX "${MAN_ALIAS_LEN} - 2")
2840afa8e06SEd Maste
2850afa8e06SEd Maste# man_copy
2860afa8e06SEd Masteforeach(f ${MAN_SOURCES})
2870afa8e06SEd Maste	add_custom_command(OUTPUT ${f}
2882ccfa855SEd Maste		COMMAND cp -f ${PROJECT_SOURCE_DIR}/man/${f} .
2890afa8e06SEd Maste		DEPENDS ${f})
2900afa8e06SEd Maste	list(APPEND COPY_FILES ${f})
2910afa8e06SEd Masteendforeach()
2920afa8e06SEd Maste
2930afa8e06SEd Maste# man_lint
2940afa8e06SEd Masteforeach(f ${MAN_SOURCES})
2950afa8e06SEd Maste	add_custom_command(OUTPUT ${f}.lint
2960afa8e06SEd Maste		COMMAND mandoc -T lint -W warning ${f} > ${f}.lint
2970afa8e06SEd Maste		DEPENDS ${f})
2980afa8e06SEd Maste	list(APPEND LINT_FILES ${f}.lint)
2990afa8e06SEd Masteendforeach()
3000afa8e06SEd Maste
3010afa8e06SEd Maste# man_html
3020afa8e06SEd Masteforeach(f ${MAN_SOURCES})
3032ccfa855SEd Maste	string(REGEX REPLACE "\\.[13]$" "" g ${f})
3040afa8e06SEd Maste	add_custom_command(OUTPUT ${g}.html
3050afa8e06SEd Maste		COMMAND mandoc -T html -O man="%N.html",style=style.css -I os="Yubico AB" ${f} > ${g}.html
3060afa8e06SEd Maste		DEPENDS ${f})
3070afa8e06SEd Maste	list(APPEND HTML_FILES ${g}.html)
3080afa8e06SEd Masteendforeach()
3090afa8e06SEd Maste
3100afa8e06SEd Maste# man_html_partial
3110afa8e06SEd Masteforeach(f ${MAN_SOURCES})
3122ccfa855SEd Maste	string(REGEX REPLACE "\\.[13]$" "" g ${f})
3130afa8e06SEd Maste	add_custom_command(OUTPUT ${g}.partial
3142ccfa855SEd Maste		COMMAND cat ${PROJECT_SOURCE_DIR}/man/dyc.css > ${g}.partial
3150afa8e06SEd Maste		COMMAND mandoc -T html -O man="%N.html",fragment ${f} >> ${g}.partial
3160afa8e06SEd Maste		DEPENDS ${f})
3170afa8e06SEd Maste	list(APPEND HTML_PARTIAL_FILES ${g}.partial)
3180afa8e06SEd Masteendforeach()
3190afa8e06SEd Maste
3200afa8e06SEd Maste# man_gzip
3210afa8e06SEd Masteforeach(f ${MAN_SOURCES})
3220afa8e06SEd Maste	add_custom_command(OUTPUT ${f}.gz
3230afa8e06SEd Maste		COMMAND gzip -cn ${f} > ${f}.gz
3240afa8e06SEd Maste		DEPENDS ${f})
3250afa8e06SEd Maste	list(APPEND GZ_FILES ${f}.gz)
3260afa8e06SEd Masteendforeach()
3270afa8e06SEd Maste
3280afa8e06SEd Mastemacro(define_symlink_target NAME EXT)
3290afa8e06SEd Maste	foreach(i RANGE 0 ${MAN_ALIAS_MAX} 2)
3300afa8e06SEd Maste		math(EXPR j "${i} + 1")
3310afa8e06SEd Maste		list(GET MAN_ALIAS ${i} SRC)
3320afa8e06SEd Maste		list(GET MAN_ALIAS ${j} DST)
3330afa8e06SEd Maste		add_custom_command(OUTPUT ${DST}.${EXT}
3340afa8e06SEd Maste			COMMAND ln -sf ${SRC}.${EXT} ${DST}.${EXT})
3350afa8e06SEd Maste		list(APPEND ${NAME}_LINK_FILES ${DST}.${EXT})
3360afa8e06SEd Maste	endforeach()
3370afa8e06SEd Maste	add_custom_target(${NAME} DEPENDS ${${NAME}_LINK_FILES})
3380afa8e06SEd Masteendmacro()
3390afa8e06SEd Maste
3400afa8e06SEd Masteadd_custom_target(man_copy DEPENDS ${COPY_FILES})
3410afa8e06SEd Masteadd_custom_target(man_lint DEPENDS ${LINT_FILES})
3420afa8e06SEd Masteadd_custom_target(man_html DEPENDS ${HTML_FILES})
3430afa8e06SEd Masteadd_custom_target(man_html_partial DEPENDS ${HTML_PARTIAL_FILES})
3440afa8e06SEd Masteadd_custom_target(man_gzip DEPENDS ${GZ_FILES})
3450afa8e06SEd Maste
3460afa8e06SEd Mastedefine_symlink_target(man_symlink 3)
3470afa8e06SEd Mastedefine_symlink_target(man_symlink_html html)
3480afa8e06SEd Mastedefine_symlink_target(man_symlink_html_partial partial)
3490afa8e06SEd Mastedefine_symlink_target(man_symlink_gzip 3.gz)
3500afa8e06SEd Maste
3510afa8e06SEd Masteadd_dependencies(man_symlink man_copy)
3520afa8e06SEd Masteadd_dependencies(man_lint man_symlink)
3530afa8e06SEd Masteadd_dependencies(man_html man_lint)
3540afa8e06SEd Masteadd_dependencies(man_symlink_html man_html)
3550afa8e06SEd Masteadd_dependencies(man_html_partial man_lint)
3560afa8e06SEd Masteadd_dependencies(man_symlink_html_partial man_html_partial)
3570afa8e06SEd Masteadd_custom_target(man ALL)
3580afa8e06SEd Maste
3590afa8e06SEd Masteif(MANDOC_PATH)
3600afa8e06SEd Maste	add_dependencies(man man_symlink_html)
3610afa8e06SEd Maste	add_dependencies(man_gzip man_lint)
3622ccfa855SEd Maste	install(FILES ${PROJECT_SOURCE_DIR}/man/style.css
3630afa8e06SEd Maste		DESTINATION "${CMAKE_INSTALL_DOCDIR}/html")
3640afa8e06SEd Maste	foreach(f ${MAN_SOURCES})
3652ccfa855SEd Maste		string(REGEX REPLACE "\\.[13]$" "" f ${f})
3662ccfa855SEd Maste		install(FILES ${PROJECT_BINARY_DIR}/man/${f}.html
3670afa8e06SEd Maste			DESTINATION "${CMAKE_INSTALL_DOCDIR}/html")
3680afa8e06SEd Maste	endforeach()
3690afa8e06SEd Maste	foreach(i RANGE 0 ${MAN_ALIAS_MAX} 2)
3700afa8e06SEd Maste		math(EXPR j "${i} + 1")
3710afa8e06SEd Maste		list(GET MAN_ALIAS ${j} DST)
3722ccfa855SEd Maste		install(FILES ${PROJECT_BINARY_DIR}/man/${DST}.html
3730afa8e06SEd Maste			DESTINATION "${CMAKE_INSTALL_DOCDIR}/html")
3740afa8e06SEd Maste	endforeach()
3750afa8e06SEd Masteendif()
3760afa8e06SEd Maste
3770afa8e06SEd Masteif(GZIP_PATH)
3780afa8e06SEd Maste	add_dependencies(man_gzip man_copy)
3790afa8e06SEd Maste	add_dependencies(man_symlink_gzip man_gzip)
3800afa8e06SEd Maste	add_dependencies(man man_symlink_gzip)
3810afa8e06SEd Maste	foreach(f ${MAN_SOURCES})
3820afa8e06SEd Maste		if (${f} MATCHES ".1$")
3832ccfa855SEd Maste			install(FILES ${PROJECT_BINARY_DIR}/man/${f}.gz
3840afa8e06SEd Maste				DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
3850afa8e06SEd Maste		elseif(${f} MATCHES ".3$")
3862ccfa855SEd Maste			install(FILES ${PROJECT_BINARY_DIR}/man/${f}.gz
3870afa8e06SEd Maste				DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
3880afa8e06SEd Maste		endif()
3890afa8e06SEd Maste	endforeach()
3900afa8e06SEd Maste	foreach(i RANGE 0 ${MAN_ALIAS_MAX} 2)
3910afa8e06SEd Maste		math(EXPR j "${i} + 1")
3920afa8e06SEd Maste		list(GET MAN_ALIAS ${j} DST)
3932ccfa855SEd Maste		install(FILES ${PROJECT_BINARY_DIR}/man/${DST}.3.gz
3940afa8e06SEd Maste			DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
3950afa8e06SEd Maste	endforeach()
3960afa8e06SEd Masteelseif(NOT MSVC)
3970afa8e06SEd Maste	add_dependencies(man man_symlink)
3980afa8e06SEd Maste	foreach(f ${MAN_SOURCES})
3990afa8e06SEd Maste		if (${f} MATCHES ".1$")
4002ccfa855SEd Maste			install(FILES ${PROJECT_BINARY_DIR}/man/${f}
4010afa8e06SEd Maste				DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
4020afa8e06SEd Maste		elseif(${f} MATCHES ".3$")
4032ccfa855SEd Maste			install(FILES ${PROJECT_BINARY_DIR}/man/${f}
4040afa8e06SEd Maste				DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
4050afa8e06SEd Maste		endif()
4060afa8e06SEd Maste	endforeach()
4070afa8e06SEd Maste	foreach(i RANGE 0 ${MAN_ALIAS_MAX} 2)
4080afa8e06SEd Maste		math(EXPR j "${i} + 1")
4090afa8e06SEd Maste		list(GET MAN_ALIAS ${j} DST)
4102ccfa855SEd Maste		install(FILES ${PROJECT_BINARY_DIR}/man/${DST}.3
4110afa8e06SEd Maste			DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
4120afa8e06SEd Maste	endforeach()
4130afa8e06SEd Masteendif()
414