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

the LibSpectre module rewrite fixes warning about use of deprecated UsePkgConfig module Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
42 lines
1.1 KiB
CMake
42 lines
1.1 KiB
CMake
# - Try to find the libmms library
|
|
# Once done this will define
|
|
#
|
|
# LIBMMS_FOUND - system has libmms
|
|
# LIBMMS_INCLUDE_DIR - the libmms include directory
|
|
# LIBMMS_LIBRARIES - the libraries needed to use libmms
|
|
#
|
|
# 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_LIBMMS QUIET libmms)
|
|
|
|
set(LIBMMS_INCLUDE_DIR ${PC_LIBMMS_INCLUDE_DIRS})
|
|
set(LIBMMS_LIBRARIES ${PC_LIBMMS_LIBRARIES})
|
|
endif()
|
|
|
|
set(LIBMMS_VERSION ${PC_LIBMMS_VERSION})
|
|
|
|
if(NOT LIBMMS_INCLUDE_DIR OR NOT LIBMMS_LIBRARIES)
|
|
find_path(LIBMMS_INCLUDE_DIR
|
|
NAMES mmsx.h
|
|
PATH_SUFFIXES libmms
|
|
HINTS $ENV{LIBMMSDIR}/include
|
|
)
|
|
|
|
find_library(LIBMMS_LIBRARIES
|
|
NAMES mms
|
|
HINTS $ENV{LIBMMSDIR}/lib
|
|
)
|
|
endif()
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(LibMms
|
|
VERSION_VAR LIBMMS_VERSION
|
|
REQUIRED_VARS LIBMMS_LIBRARIES LIBMMS_INCLUDE_DIR
|
|
)
|
|
|
|
mark_as_advanced(LIBMMS_INCLUDE_DIR LIBMMS_LIBRARIES)
|