mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-25 03:12:49 +00:00

using pkg-config search as primary method with fallback to path lookup, this may result in overlinking however if libraries require additional include paths (as is the case with PulseAudio) with this change that will not be a problem. it will also reduce the lookups done during configuration/build since path lookups will not be done, unless pkg-config lookup does not set the required variables. Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
31 lines
721 B
CMake
31 lines
721 B
CMake
# - Try to find GMP
|
|
# Once done this will define
|
|
#
|
|
# GMP_FOUND - system has GMP
|
|
# GMP_INCLUDE_DIR - the GMP include directory
|
|
# GMP_LIBRARIES - The libraries needed to use GMP
|
|
#
|
|
# Copyright (c) 2020, Ivailo Monev, <xakepa10@gmail.com>
|
|
#
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
if(GMP_INCLUDE_DIR AND GMP_LIBRARIES)
|
|
set(GMP_FIND_QUIETLY TRUE)
|
|
endif()
|
|
|
|
find_path(GMP_INCLUDE_DIR
|
|
NAMES gmp.h
|
|
HINTS $ENV{GMPDIR}/include
|
|
)
|
|
|
|
find_library(GMP_LIBRARIES
|
|
NAMES gmp
|
|
HINTS $ENV{GMPDIR}/lib
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(GMP
|
|
REQUIRED_VARS GMP_LIBRARIES GMP_INCLUDE_DIR
|
|
)
|
|
|
|
mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES)
|