Skip to content

Commit

Permalink
Improve finding of bash-completion
Browse files Browse the repository at this point in the history
Specifying config mode for find_package() results in a more elegant
error message when the package isn't found, especially when it is
optional.
  • Loading branch information
leonlynch committed Aug 28, 2023
1 parent 1e9c3ac commit 32287b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ install(FILES
)

# Install bash-completion files
find_package(bash-completion) # Optional for providing bash-completion files
find_package(bash-completion CONFIG) # Optional for providing bash-completion files
if(BASH_COMPLETION_FOUND)
set(EMV_UTILS_INSTALL_BASH_COMPLETION_DIR ${CMAKE_INSTALL_DATADIR}/bash-completion/completions CACHE STRING "Installation location for emv-utils bash-completion files")
message(STATUS "Using bash-completion install location \"${EMV_UTILS_INSTALL_BASH_COMPLETION_DIR}\"")
Expand Down

0 comments on commit 32287b3

Please sign in to comment.