mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 10:47:59 +08:00

This marks all `<PACKAGENAME>_FOUND` result variables as deprecated where possible (for `<PackageName>` find modules) to make it clearer which variable to use. In CMake 3.3, the FindPackageHandleStandardArgs module was refactored to set both `<PackageName>_FOUND` and uppercase `<PACKAGENAME>_FOUND` result variables to the same values. Before that, the FOUND_VAR argument could be used to set the result variable. * FindMatlab: Uppercased MATLAB_FOUND is not mentioned as it was never documented. * Documentation for FindPythonInterp and FindPythonLibs modules synced accordingly to their deprecation (3.12 instead of 4.2). * OPENGL_FOUND: deprecation version synced with other find modules. * DevIL_FOUND was introduced in CMake 3.8. The uppercased variant not mentioned as it was previously never documented. Fixes: #27242
72 lines
2.2 KiB
CMake
72 lines
2.2 KiB
CMake
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
# file LICENSE.rst or https://cmake.org/licensing for details.
|
|
|
|
#[=======================================================================[.rst:
|
|
FindLibRHash
|
|
------------
|
|
|
|
Find LibRHash include directory and library.
|
|
|
|
Imported Targets
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
An :ref:`imported target <Imported targets>` named
|
|
``LibRHash::LibRHash`` is provided if LibRHash has been found.
|
|
|
|
Result Variables
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
This module defines the following variables:
|
|
|
|
``LibRHash_FOUND``
|
|
Boolean indicating whether LibRHash was found.
|
|
``LibRHash_INCLUDE_DIRS``
|
|
Include directories needed to include LibRHash headers.
|
|
``LibRHash_LIBRARIES``
|
|
Libraries needed to link to LibRHash.
|
|
|
|
Cache Variables
|
|
^^^^^^^^^^^^^^^
|
|
|
|
This module uses the following cache variables:
|
|
|
|
``LibRHash_LIBRARY``
|
|
The location of the LibRHash library file.
|
|
``LibRHash_INCLUDE_DIR``
|
|
The location of the LibRHash include directory containing ``rhash.h``.
|
|
|
|
The cache variables should not be used by project code.
|
|
They may be set by end users to point at LibRHash components.
|
|
#]=======================================================================]
|
|
|
|
#-----------------------------------------------------------------------------
|
|
find_library(LibRHash_LIBRARY
|
|
NAMES rhash
|
|
)
|
|
mark_as_advanced(LibRHash_LIBRARY)
|
|
|
|
find_path(LibRHash_INCLUDE_DIR
|
|
NAMES rhash.h
|
|
)
|
|
mark_as_advanced(LibRHash_INCLUDE_DIR)
|
|
|
|
#-----------------------------------------------------------------------------
|
|
include(${CMAKE_CURRENT_LIST_DIR}/../../Modules/FindPackageHandleStandardArgs.cmake)
|
|
find_package_handle_standard_args(LibRHash
|
|
REQUIRED_VARS LibRHash_LIBRARY LibRHash_INCLUDE_DIR
|
|
)
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Provide documented result variables and targets.
|
|
if(LibRHash_FOUND)
|
|
set(LibRHash_INCLUDE_DIRS ${LibRHash_INCLUDE_DIR})
|
|
set(LibRHash_LIBRARIES ${LibRHash_LIBRARY})
|
|
if(NOT TARGET LibRHash::LibRHash)
|
|
add_library(LibRHash::LibRHash UNKNOWN IMPORTED)
|
|
set_target_properties(LibRHash::LibRHash PROPERTIES
|
|
IMPORTED_LOCATION "${LibRHash_LIBRARY}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${LibRHash_INCLUDE_DIRS}"
|
|
)
|
|
endif()
|
|
endif()
|