From a8bf1ea5b7aa51235b16c202bbd485bfa5480e19 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 22 May 2018 09:55:46 -0400 Subject: FindBZip2: Format result variable docs as definition list --- Modules/FindBZip2.cmake | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index 0375b09..3452349 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -18,13 +18,16 @@ # # This module defines the following variables: # -# :: -# -# BZIP2_FOUND - system has BZip2 -# BZIP2_INCLUDE_DIR - the BZip2 include directory -# BZIP2_LIBRARIES - Link these to use BZip2 -# BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_ -# BZIP2_VERSION_STRING - the version of BZip2 found (since CMake 2.8.8) +# ``BZIP2_FOUND`` +# system has BZip2 +# ``BZIP2_INCLUDE_DIR`` +# the BZip2 include directory +# ``BZIP2_LIBRARIES`` +# Link these to use BZip2 +# ``BZIP2_NEED_PREFIX`` +# this is set if the functions are prefixed with ``BZ2_`` +# ``BZIP2_VERSION_STRING`` +# the version of BZip2 found set(_BZIP2_PATHS PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Bzip2;InstallPath]" -- cgit v0.12 From 0887c993aaadba6315dedca5399fae8cb7b9c965 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 22 May 2018 09:51:48 -0400 Subject: FindBZip2: Populate BZIP2_INCLUDE_DIRS result variable The plural-named non-cached result variable is needed to follow our module conventions documented in `cmake-developer(7)`. The variable is also used to populate our ``BZip2::BZip2`` imported target include directories, which was broken without this variable set. Fixes: #18013 --- Modules/FindBZip2.cmake | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index 3452349..4d7123d 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -20,14 +20,22 @@ # # ``BZIP2_FOUND`` # system has BZip2 -# ``BZIP2_INCLUDE_DIR`` -# the BZip2 include directory +# ``BZIP2_INCLUDE_DIRS`` +# the BZip2 include directories # ``BZIP2_LIBRARIES`` # Link these to use BZip2 # ``BZIP2_NEED_PREFIX`` # this is set if the functions are prefixed with ``BZ2_`` # ``BZIP2_VERSION_STRING`` # the version of BZip2 found +# +# Cache variables +# ^^^^^^^^^^^^^^^ +# +# The following cache variables may also be set: +# +# ``BZIP2_INCLUDE_DIR`` +# the BZip2 include directory set(_BZIP2_PATHS PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Bzip2;InstallPath]" @@ -56,6 +64,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 VERSION_VAR BZIP2_VERSION_STRING) if (BZIP2_FOUND) + set(BZIP2_INCLUDE_DIRS ${BZIP2_INCLUDE_DIR}) include(${CMAKE_CURRENT_LIST_DIR}/CheckSymbolExists.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake) cmake_push_check_state() -- cgit v0.12