Warning, /multimedia/k3b/cmake/modules/FindSamplerate.cmake is written in an unsupported language. File is not indexed.

0001 # - Try to find Samplerate
0002 # Once done this will define
0003 #
0004 #  SAMPLERATE_FOUND - system has Samplerate
0005 #  SAMPLERATE_INCLUDE_DIR - the Samplerate include directory
0006 #  SAMPLERATE_LIBRARIES - Link these to use Samplerate
0007 #  SAMPLERATE_DEFINITIONS - Compiler switches required for using Samplerate
0008 # SPDX-FileCopyrightText: 2007 Laurent Montel <montel@kde.org>
0009 # SPDX-License-Identifier: BSD-3-Clause
0010 
0011 if(SAMPLERATE_INCLUDE_DIR AND SAMPLERATE_LIBRARIES)
0012     # in cache already
0013     set(Samplerate_FIND_QUIETLY TRUE)
0014 endif()
0015 
0016 find_path(SAMPLERATE_INCLUDE_DIR NAMES samplerate.h)
0017 
0018 find_library(SAMPLERATE_LIBRARIES NAMES samplerate samplerate-0 libsamplerate libsamplerate-0)
0019 
0020 include(FindPackageHandleStandardArgs)
0021 find_package_handle_standard_args(Samplerate DEFAULT_MSG SAMPLERATE_INCLUDE_DIR SAMPLERATE_LIBRARIES)
0022 
0023 add_library(samplerate SHARED IMPORTED)
0024 set_target_properties(samplerate PROPERTIES
0025     INTERFACE_INCLUDE_DIRECTORIES "${SAMPLERATE_INCLUDE_DIR}"
0026     IMPORTED_LOCATION "${SAMPLERATE_LIBRARIES}"
0027 )
0028 
0029 # show the SAMPLERATE_INCLUDE_DIR and SAMPLERATE_LIBRARIES variables only in the advanced view
0030 mark_as_advanced(SAMPLERATE_INCLUDE_DIR SAMPLERATE_LIBRARIES)