mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 15:19:44 +02:00
Also, necessarily coupled with this: * add CMakeLists.txt for vendored libnyquist * fix SoundTouch header include paths * move nyq_reformat_aud_do_response function * handle portSMF headers installed to portsmf or portSMF Signed-off-by: Be <be@mixxx.org>
78 lines
1.8 KiB
CMake
78 lines
1.8 KiB
CMake
# Copyright (C) 2001-2020 Mixxx Development Team
|
|
# Distributed under the GNU General Public Licence (GPL) version 2 or any later
|
|
# later version. See the LICENSE.txt file for details.
|
|
|
|
#[=======================================================================[.rst:
|
|
FindOgg
|
|
-------
|
|
|
|
Finds the Ogg library.
|
|
|
|
Result Variables
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
This will define the following variables:
|
|
|
|
``Ogg_FOUND``
|
|
True if the system has the Ogg library.
|
|
``Ogg_INCLUDE_DIRS``
|
|
Include directories needed to use Ogg.
|
|
``Ogg_LIBRARIES``
|
|
Libraries needed to link to Ogg.
|
|
``Ogg_DEFINITIONS``
|
|
Compile definitions needed to use Ogg.
|
|
|
|
Cache Variables
|
|
^^^^^^^^^^^^^^^
|
|
|
|
The following cache variables may also be set:
|
|
|
|
``Ogg_INCLUDE_DIR``
|
|
The directory containing ``ogg/ogg.h``.
|
|
``Ogg_LIBRARY``
|
|
The path to the Ogg library.
|
|
|
|
#]=======================================================================]
|
|
find_package(PkgConfig QUIET)
|
|
if(PkgConfig_FOUND)
|
|
pkg_check_modules(PC_Ogg QUIET ogg)
|
|
endif()
|
|
|
|
find_path(Ogg_INCLUDE_DIR
|
|
NAMES ogg/ogg.h
|
|
PATHS ${PC_Ogg_INCLUDE_DIRS}
|
|
DOC "Ogg include directory"
|
|
)
|
|
mark_as_advanced(Ogg_INCLUDE_DIR)
|
|
|
|
find_library(Ogg_LIBRARY
|
|
NAMES ogg
|
|
PATHS ${PC_Ogg_LIBRARY_DIRS}
|
|
DOC "Ogg library"
|
|
)
|
|
mark_as_advanced(Ogg_LIBRARY)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(
|
|
Ogg
|
|
REQUIRED_VARS
|
|
Ogg_INCLUDE_DIR
|
|
Ogg_LIBRARY
|
|
)
|
|
|
|
if(Ogg_FOUND)
|
|
set(Ogg_LIBRARIES ${Ogg_LIBRARY})
|
|
set(Ogg_INCLUDE_DIRS ${Ogg_INCLUDE_DIR})
|
|
set(Ogg_DEFINITIONS ${PC_Ogg_CFLAGS_OTHER})
|
|
|
|
if(NOT TARGET Ogg::ogg)
|
|
add_library(Ogg::ogg UNKNOWN IMPORTED)
|
|
set_target_properties(Ogg::ogg
|
|
PROPERTIES
|
|
IMPORTED_LOCATION "${Ogg_LIBRARY}"
|
|
INTERFACE_COMPILE_OPTIONS "${PC_Ogg_CFLAGS_OTHER}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${Ogg_INCLUDE_DIR}"
|
|
)
|
|
endif()
|
|
endif()
|