mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +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>
43 lines
1.2 KiB
CMake
43 lines
1.2 KiB
CMake
# - Try to find Qalculate
|
|
#
|
|
# Once done this will define
|
|
#
|
|
# QALCULATE_FOUND - system has Qalculate
|
|
# QALCULATE_INCLUDE_DIR - the Qalculate include directory
|
|
# QALCULATE_LIBRARIES - the Qalculate libraries
|
|
#
|
|
# 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_QALCULATE QUIET libqalculate)
|
|
|
|
set(QALCULATE_INCLUDE_DIR ${PC_QALCULATE_INCLUDE_DIRS})
|
|
set(QALCULATE_LIBRARIES ${PC_QALCULATE_LIBRARIES})
|
|
endif()
|
|
|
|
set(QALCULATE_VERSION ${PC_QALCULATE_VERSION})
|
|
|
|
if(NOT QALCULATE_INCLUDE_DIR OR NOT QALCULATE_LIBRARIES)
|
|
find_path(QALCULATE_INCLUDE_DIR
|
|
NAMES qalculate.h
|
|
PATH_SUFFIXES libqalculate
|
|
HINTS $ENV{QALCULATEDIR}/include
|
|
)
|
|
|
|
find_library(QALCULATE_LIBRARIES
|
|
NAMES qalculate
|
|
HINTS $ENV{QALCULATEDIR}/lib
|
|
)
|
|
endif()
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(Qalculate
|
|
VERSION_VAR QALCULATE_VERSION
|
|
REQUIRED_VARS QALCULATE_LIBRARIES QALCULATE_INCLUDE_DIR
|
|
)
|
|
|
|
mark_as_advanced(QALCULATE_INCLUDE_DIR QALCULATE_LIBRARIES)
|