view cmake/function/IrccdDefineMan.cmake @ 826:f85faf0f5d70

irccd: rename command to transport_command
author David Demelier <markand@malikania.fr>
date Tue, 08 Jan 2019 21:47:59 +0100
parents 06cc2f95f479
children 00a4720c4874
line wrap: on
line source

#
# IrccdDefineMan.cmake -- CMake build system for irccd
#
# Copyright (c) 2013-2019 David Demelier <markand@malikania.fr>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

#
# irccd_define_man
# ----------------
#
# irccd_define_man(file, man)
#
# Parameters:
#   file        The file name to build
#   man         The man section
#
# This function configure the manual and install it if IRCCD_WITH_MAN is set.
#

function(irccd_define_man file man)
	if (IRCCD_WITH_MAN)
		set(input ${doc_SOURCE_DIR}/man/${file}.in)
		set(output ${CMAKE_CURRENT_BINARY_DIR}/${file})
		configure_file(${input} ${output} @ONLY)
		install(FILES ${output} DESTINATION ${CMAKE_INSTALL_MANDIR}/${man})
	endif ()
endfunction()