Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/FindSHLWAPI.cmake
# Try to find the SHLWAPI librairy | # Copyright (c) 2017-2020 The Bitcoin developers | ||||
# SHLWAPI_FOUND - system has SHLWAPI lib | # Distributed under the MIT software license, see the accompanying | ||||
# SHLWAPI_INCLUDE_DIR - the SHLWAPI include directory | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
# SHLWAPI_LIBRARY - Libraries needed to use SHLWAPI | |||||
# .rst: | |||||
if(SHLWAPI_INCLUDE_DIR AND SHLWAPI_LIBRARY) | # FindSHLWAPI | ||||
# Already in cache, be silent | # -------------- | ||||
set(SHLWAPI_FIND_QUIETLY TRUE) | # | ||||
endif() | # Find the SHLWAPI library. The following conponents are | ||||
# available:: | |||||
find_path(SHLWAPI_INCLUDE_DIR NAMES shlwapi.h) | # shlwapi | ||||
find_library(SHLWAPI_LIBRARY NAMES shlwapi) | # | ||||
# This will define the following variables:: | |||||
message(STATUS "SHLWAPI lib: " ${SHLWAPI_LIBRARY}) | # | ||||
# SHLWAPI_FOUND - True if the SHLWAPI library is found. | |||||
# SHLWAPI_INCLUDE_DIRS - List of the header include directories. | |||||
# SHLWAPI_LIBRARIES - List of the libraries. | |||||
# | |||||
# And the following imported targets:: | |||||
# | |||||
# SHLWAPI::shlwapi | |||||
find_path(SHLWAPI_INCLUDE_DIR | |||||
NAMES shlwapi.h | |||||
) | |||||
set(SHLWAPI_INCLUDE_DIRS "${SHLWAPI_INCLUDE_DIR}") | |||||
mark_as_advanced(SHLWAPI_INCLUDE_DIR) | |||||
include(ExternalLibraryHelper) | |||||
find_component(SHLWAPI shlwapi | |||||
NAMES shlwapi | |||||
INCLUDE_DIRS ${SHLWAPI_INCLUDE_DIRS} | |||||
) | |||||
include(FindPackageHandleStandardArgs) | include(FindPackageHandleStandardArgs) | ||||
find_package_handle_standard_args(GMP DEFAULT_MSG SHLWAPI_INCLUDE_DIR SHLWAPI_LIBRARY) | find_package_handle_standard_args(SHLWAPI | ||||
REQUIRED_VARS | |||||
mark_as_advanced(SHLWAPI_INCLUDE_DIR SHLWAPI_LIBRARY) | SHLWAPI_INCLUDE_DIR | ||||
HANDLE_COMPONENTS | |||||
set(SHLWAPI_LIBRARIES ${SHLWAPI_LIBRARY}) | ) | ||||
set(SHLWAPI_INCLUDE_DIRS ${SHLWAPI_INCLUDE_DIR}) |