aboutsummaryrefslogtreecommitdiffstats
path: root/docs/CMakeLists.txt
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2017-09-23 21:38:08 +0200
committerPiotr Krysik <ptrkrysik@gmail.com>2017-09-23 21:38:08 +0200
commitfa2bb860f9515322fb742278fb5508602b230a84 (patch)
treeed07836cb2632b959458d82874cfa7484502d5e0 /docs/CMakeLists.txt
parent20510f4fe613bcccc0488e58540caa46054dba64 (diff)
Changes so that rst2man presence is optional and not mandatory to compile/install gr-gsm
Diffstat (limited to 'docs/CMakeLists.txt')
-rw-r--r--docs/CMakeLists.txt13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 041fc60..ed0fe3d 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -38,9 +38,6 @@ endif(ENABLE_DOXYGEN)
# Convert manual pages from rst to roff and install them
########################################################################
find_program(RST2MAN_EXECUTABLE NAMES rst2man rst2man.py rst2man2 rst2man2.py)
-if(NOT RST2MAN_EXECUTABLE)
- message(FATAL "rst2man from python-docutils is required to build man pages")
-endif()
function(BUILD_MAN_PAGE _sources _src _dst)
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_dst}"
@@ -53,5 +50,11 @@ function(BUILD_MAN_PAGE _sources _src _dst)
add_custom_target(man_${_src} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_dst})
endfunction()
-build_man_page(MAN1_OUTPUT grgsm_livemon.rst grgsm_livemon.1)
-install(FILES ${MAN1_OUTPUT} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
+if(NOT RST2MAN_EXECUTABLE)
+ message(WARNING "rst2man from python-docutils is required to build man pages")
+else()
+ build_man_page(MAN1_OUTPUT grgsm_livemon.rst grgsm_livemon.1)
+ install(FILES ${MAN1_OUTPUT} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
+endif()
+
+