diff --git a/CMakeLists.txt b/CMakeLists.txt index d390f672d..f98aa179a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,11 +64,10 @@ if(WITH_CCACHE) # Use the Compiler Cache (ccache) program # (install with: sudo apt get ccache) find_program(CCACHE_FOUND ccache) - if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND}) - else() + if(NOT CCACHE_FOUND) message(FATAL_ERROR "ccache requested but cannot be found.") endif() + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND}) endif() if(WITH_XC_ALL) @@ -426,16 +425,14 @@ if(APPLE) find_program(MACDEPLOYQT_EXE macdeployqt HINTS ${Qt5_PREFIX}/bin ENV PATH) if(NOT MACDEPLOYQT_EXE) message(FATAL_ERROR "macdeployqt is required to build on macOS") - else() - message(STATUS "Using macdeployqt: ${MACDEPLOYQT_EXE}") endif() + message(STATUS "Using macdeployqt: ${MACDEPLOYQT_EXE}") elseif(MINGW) find_program(WINDEPLOYQT_EXE windeployqt HINTS ${Qt5_PREFIX}/bin ENV PATH) if(NOT WINDEPLOYQT_EXE) message(FATAL_ERROR "windeployqt is required to build on Windows") - else() - message(STATUS "Using windeployqt: ${WINDEPLOYQT_EXE}") endif() + message(STATUS "Using windeployqt: ${WINDEPLOYQT_EXE}") endif() # Debian sets the the build type to None for package builds. diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 53e2cbe8b..dec7a2a37 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -16,9 +16,8 @@ find_program(ASCIIDOCTOR_EXE asciidoctor) if(NOT ASCIIDOCTOR_EXE) message(FATAL_ERROR "asciidoctor is required to build documentation") -else() - message(STATUS "Using asciidoctor: ${ASCIIDOCTOR_EXE}") endif() +message(STATUS "Using asciidoctor: ${ASCIIDOCTOR_EXE}") set(DOC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -49,7 +48,7 @@ install(FILES DESTINATION ${DATA_INSTALL_DIR}/docs) # Build Man Pages on Linux and macOS -if(APPLE OR UNIX) +if(UNIX) add_custom_command(OUTPUT keepassxc.1 COMMAND ${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -b manpage -a revnumber=${KEEPASSXC_VERSION} ${DOC_DIR}/man/keepassxc.1.adoc DEPENDS ${DOC_DIR}/man/keepassxc.1.adoc