Skip to content

Commit

Permalink
Fix man pages not being built when using CMake.
Browse files Browse the repository at this point in the history
Closes eclipse#1969. Thanks to phplpf.
  • Loading branch information
ralight authored and fAuernigg committed Jan 4, 2021
1 parent d220580 commit 0d6d0bb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Expand Up @@ -4,6 +4,9 @@ Broker:
- mosquitto_connect_bind_async() and mosquitto_connect_bind_v5() should not
reset the bind address option if called with bind_address == NULL.

Build:
- Fix man pages not being built when using CMake. Closes #1969.


2.0.3 - 2020-12-17
==================
Expand Down
21 changes: 21 additions & 0 deletions man/CMakeLists.txt
@@ -1,3 +1,24 @@
if(NOT WIN32)
function(compile_manpage page)
add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/man/${page}
COMMAND xsltproc ${CMAKE_SOURCE_DIR}/man/${page}.xml -o ${CMAKE_SOURCE_DIR}/man/
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/man/${page}.xml)
add_custom_target(${page} ALL DEPENDS ${CMAKE_SOURCE_DIR}/man/${page})
endfunction()

compile_manpage("mosquitto_ctrl.1")
compile_manpage("mosquitto_ctrl_dynsec.1")
compile_manpage("mosquitto_passwd.1")
compile_manpage("mosquitto_pub.1")
compile_manpage("mosquitto_sub.1")
compile_manpage("mosquitto_rr.1")
compile_manpage("libmosquitto.3")
compile_manpage("mosquitto.conf.5")
compile_manpage("mosquitto-tls.7")
compile_manpage("mqtt.7")
compile_manpage("mosquitto.8")
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 libmosquitto.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
install(FILES mosquitto.conf.5 DESTINATION ${CMAKE_INSTALL_MANDIR}/man5)
Expand Down

0 comments on commit 0d6d0bb

Please sign in to comment.