diff --git a/CMakeLists.txt b/CMakeLists.txt index c7c63f22..e6e4a155 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -377,7 +377,7 @@ if(BUILD_MAN) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/man/gmic.1 DEPENDS gmic - COMMAND LD_LIBRARY_PATH=${GMIC_BINARIES_PATH} ${GMIC_BINARIES_PATH}/gmic -v - ${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic raw:${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic,uchar -__help man 2> ${CMAKE_BINARY_DIR}/man/gmic.1 + COMMAND LD_LIBRARY_PATH=${GMIC_BINARIES_PATH} ${GMIC_BINARIES_PATH}/gmic -v - ${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic raw:${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic,uchar -__help man > ${CMAKE_BINARY_DIR}/man/gmic.1 ) add_custom_target(man ALL DEPENDS ${CMAKE_BINARY_DIR}/man/gmic.1) install(FILES ${CMAKE_BINARY_DIR}/man/gmic.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/) @@ -388,9 +388,10 @@ if(BUILD_BASH_COMPLETION) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh DEPENDS gmic - COMMAND LD_LIBRARY_PATH=${GMIC_BINARIES_PATH} ${GMIC_BINARIES_PATH}/gmic -v - ${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic raw:${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic,uchar -document_gmic bash 2> ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh + COMMAND LD_LIBRARY_PATH=${GMIC_BINARIES_PATH} ${GMIC_BINARIES_PATH}/gmic -v - ${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic raw:${CMAKE_SOURCE_DIR}/src/gmic_stdlib.gmic,uchar -document_gmic bash > ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh ) add_custom_target(bashcompletion ALL DEPENDS ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh) + install(FILES ${CMAKE_BINARY_DIR}/resources/gmic_bashcompletion.sh RENAME gmic DESTINATION ${CMAKE_INSTALL_DATADIR}/bash-completion/completions) endif() include(CMakePackageConfigHelpers)