@ -1,9 +1,12 @@
if ( NOT WIN32 )
# I f w e a r e b u i l d i n g f r o m a r e l e a s e t a r b a l l , t h e m a n p a g e s s h o u l d a l r e a d y b e b u i l t , s o t h e m .
find_program ( XSLTPROC xsltproc REQUIRED )
# I f w e a r e b u i l d i n g f r o m g i t , t h e n t h e m a n p a g e s w i l l n o t b e b u i l t . I n t h i s
if ( NOT XSLTPROC )
# c a s e , a t t e m p t t o f i n d x s l t p r o c , a n d i f f o u n d b u i l d t h e m a n p a g e s . I f x s l t p r o c
message ( FATAL_ERROR "xsltproc not found: manpages cannot be built" )
# c o u l d n o t b e f o u n d , t h e n t h e m a n p a g e s w i l l n o t b e b u i l t o r i n s t a l l e d -
endif ( )
# b e c a u s e t h e i n s t a l l i s o p t i o n a l .
if ( NOT WIN32 )
find_program ( XSLTPROC xsltproc OPTIONAL )
if ( XSLTPROC )
function ( compile_manpage page )
function ( compile_manpage page )
add_custom_command ( OUTPUT ${ CMAKE_SOURCE_DIR } /man/ ${ page }
add_custom_command ( OUTPUT ${ CMAKE_SOURCE_DIR } /man/ ${ page }
C O M M A N D x s l t p r o c $ { C M A K E _ S O U R C E _ D I R } / m a n / $ { p a g e } . x m l - o $ { C M A K E _ S O U R C E _ D I R } / m a n /
C O M M A N D x s l t p r o c $ { C M A K E _ S O U R C E _ D I R } / m a n / $ { p a g e } . x m l - o $ { C M A K E _ S O U R C E _ D I R } / m a n /
@ -22,10 +25,23 @@ if(NOT WIN32)
compile_manpage ( "mosquitto-tls.7" )
compile_manpage ( "mosquitto-tls.7" )
compile_manpage ( "mqtt.7" )
compile_manpage ( "mqtt.7" )
compile_manpage ( "mosquitto.8" )
compile_manpage ( "mosquitto.8" )
else ( )
message ( FATAL_ERROR "xsltproc not found: manpages cannot be built" )
endif ( )
endif ( )
endif ( )
install ( FILES mosquitto_ctrl.1 mosquitto_ctrl_dynsec.1 mosquitto_passwd.1 mosquitto_pub.1 mosquitto_sub.1 mosquitto_rr.1 DESTINATION ${ CMAKE_INSTALL_MANDIR } /man1 )
install ( FILES
install ( FILES libmosquitto.3 DESTINATION ${ CMAKE_INSTALL_MANDIR } /man3 )
m o s q u i t t o _ c t r l . 1
install ( FILES mosquitto.conf.5 DESTINATION ${ CMAKE_INSTALL_MANDIR } /man5 )
m o s q u i t t o _ c t r l _ d y n s e c . 1
install ( FILES mosquitto-tls.7 mqtt.7 DESTINATION ${ CMAKE_INSTALL_MANDIR } /man7 )
m o s q u i t t o _ p a s s w d . 1
install ( FILES mosquitto.8 DESTINATION ${ CMAKE_INSTALL_MANDIR } /man8 )
m o s q u i t t o _ p u b . 1
m o s q u i t t o _ s u b . 1
m o s q u i t t o _ r r . 1
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ M A N D I R } / m a n 1
O P T I O N A L )
install ( FILES libmosquitto.3 DESTINATION ${ CMAKE_INSTALL_MANDIR } /man3 OPTIONAL )
install ( FILES mosquitto.conf.5 DESTINATION ${ CMAKE_INSTALL_MANDIR } /man5 OPTIONAL )
install ( FILES mosquitto-tls.7 mqtt.7 DESTINATION ${ CMAKE_INSTALL_MANDIR } /man7 OPTIONAL )
install ( FILES mosquitto.8 DESTINATION ${ CMAKE_INSTALL_MANDIR } /man8 OPTIONAL )