From 545267283a576b65b1ef1cea5822448125f46a4a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 21 Jan 2020 00:31:50 +0100 Subject: [PATCH] Fix target pdfmanual when using ninja Fix instructions in Macports, add instructions for Homebrew --- CMakeLists.txt | 26 +++++++++++++++++++++----- README.md | 32 ++++++++------------------------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6ffd9417..5955170a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2179,6 +2179,21 @@ if(DOXYGEN_FOUND) set(HAVE_DOT ${DOXYGEN_DOT_FOUND}) file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir) + set(PDFMANUAL_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM}) + if(PDFMANUAL_MAKE_PROGRAM MATCHES "ninja") + find_program(PDFMANUAL_MAKE_EXECUTABLE make + PATHS + /usr/bin + /usr/local/bin + ) + if(NOT PDFMANUAL_MAKE_EXECUTABLE) + if(PDFLATEX_COMPILER) + message(STATUS "Warning: make is required to build the PDF manual, so target pdfmanual will not be generated.") + endif() + set(PDFLATEX_COMPILER FALSE) + endif() + set(PDFMANUAL_MAKE_PROGRAM ${PDFMANUAL_MAKE_EXECUTABLE}) + endif() if(PDFLATEX_COMPILER) set(GENERATE_PDF_DOCUMENTATION "YES") set(GNSSSDR_USE_MATHJAX "NO") @@ -2193,17 +2208,17 @@ if(DOXYGEN_FOUND) add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/docs/doxygen/Doxyfile WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Generating source code documentation with Doxygen." VERBATIM + COMMENT "Generating HTML documentation from source code with Doxygen..." VERBATIM ) if(PDFLATEX_COMPILER) message(STATUS " '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual' will generate a manual at ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf") add_custom_target(pdfmanual - COMMAND ${CMAKE_MAKE_PROGRAM} + COMMAND ${PDFMANUAL_MAKE_PROGRAM} COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf - COMMAND ${CMAKE_MAKE_PROGRAM} clean + COMMAND ${PDFMANUAL_MAKE_PROGRAM} clean DEPENDS doc WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/docs/latex - COMMENT "Generating PDF manual with Doxygen." VERBATIM + COMMENT "Generating PDF manual with LaTeX and pdflatex..." VERBATIM ) endif() message(STATUS " '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc-clean' will clean the documentation.") @@ -2225,7 +2240,8 @@ else() endif() endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - message(STATUS " or simply by doing 'sudo port install doxygen +latex'.") + message(STATUS " or simply by doing 'sudo port install doxygen +docs', if you are using Macports,") + message(STATUS " or 'brew cask install mactex', then restart Terminal and do 'brew install graphviz doxygen', if you use Homebrew.") endif() endif() diff --git a/README.md b/README.md index a04b1308b..09bcc806f 100644 --- a/README.md +++ b/README.md @@ -596,20 +596,12 @@ In a terminal, type: ~~~~~~ $ sudo port selfupdate $ sudo port upgrade outdated -$ sudo port install pkgconfig -$ sudo port install gnuradio -$ sudo port install lapack -$ sudo port install armadillo -$ sudo port install gnutls +$ sudo port install armadillo cmake gnuradio gnutls lapack libad9361-iio libiio \ + matio pkgconfig protobuf3-cpp pugixml $ sudo port install google-glog +gflags -$ sudo port install matio -$ sudo port install pugixml -$ sudo port install protobuf3-cpp -$ sudo port install libiio -$ sudo port install libad9361-iio +$ sudo port install doxygen +docs $ sudo port install py37-mako $ sudo port install py37-six -$ sudo port install doxygen +docs ~~~~~~ You also might need to activate a Python installation. The list of installed versions can be retrieved with: @@ -644,21 +636,13 @@ $ sudo python3 get-pip.py Install the required dependencies: ~~~~~~ -$ brew install cmake -$ brew install pkg-config -$ brew install hdf5 -$ brew install lapack -$ brew install armadillo -$ brew install gflags -$ brew install glog -$ brew install gnuradio -$ brew install libmatio -$ brew install log4cpp -$ brew install openssl -$ brew install pugixml -$ brew install protobuf +$ brew update && brew upgrade +$ brew install armadillo cmake hdf5 gflags glog gnuradio lapack libmatio log4cpp \ + openssl pkg-config protobuf pugixml $ pip3 install mako $ pip3 install six +$ brew cask install mactex # when completed, restart Terminal +$ brew install graphviz doxygen ~~~~~~