mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 19:02:48 +00:00

since find_package_handle_standard_args() is used and no status messages are printed by the modules there is no reason to set <MODULE>_FIND_QUIETLY variable (which should be prefixed with the actual module name, not upper case) Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
42 lines
1 KiB
CMake
42 lines
1 KiB
CMake
# - Try to find MPFR
|
|
#
|
|
# Once done this will define
|
|
#
|
|
# MPFR_FOUND - system has MPFR
|
|
# MPFR_INCLUDE_DIR - the MPFR include directory
|
|
# MPFR_LIBRARIES - the libraries needed to use MPFR
|
|
#
|
|
# Copyright (c) 2020, Ivailo Monev, <xakepa10@gmail.com>
|
|
#
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
|
|
if(NOT WIN32)
|
|
include(FindPkgConfig)
|
|
pkg_check_modules(PC_MPFR QUIET mpfr)
|
|
|
|
set(MPFR_INCLUDE_DIR ${PC_MPFR_INCLUDE_DIRS})
|
|
set(MPFR_LIBRARIES ${PC_MPFR_LIBRARIES})
|
|
endif()
|
|
|
|
set(MPFR_VERSION ${PC_MPFR_VERSION})
|
|
|
|
if(NOT MPFR_INCLUDE_DIR OR NOT MPFR_LIBRARIES)
|
|
find_path(MPFR_INCLUDE_DIR
|
|
NAMES mpfr.h
|
|
HINTS $ENV{MPFRDIR}/include
|
|
)
|
|
|
|
find_library(MPFR_LIBRARIES
|
|
NAMES mpfr
|
|
HINTS $ENV{MPFRDIR}/lib
|
|
)
|
|
endif()
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(MPFR
|
|
VERSION_VAR MPFR_VERSION
|
|
REQUIRED_VARS MPFR_LIBRARIES MPFR_INCLUDE_DIR
|
|
)
|
|
|
|
mark_as_advanced(MPFR_INCLUDE_DIR MPFR_LIBRARIES)
|