mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-02 14:50:17 +01:00
CMake: replace Conan with find_package and add find modules
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>
This commit is contained in:
183
CMakeLists.txt
183
CMakeLists.txt
@@ -91,6 +91,7 @@ set( CMAKE_MODULE_PATH
|
|||||||
${AUDACITY_MODULE_PATH}
|
${AUDACITY_MODULE_PATH}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_MODULE_PATH}
|
${CMAKE_MODULE_PATH}
|
||||||
|
"${CMAKE_SOURCE_DIR}/cmake-modules"
|
||||||
)
|
)
|
||||||
|
|
||||||
set( CMAKE_PREFIX_PATH
|
set( CMAKE_PREFIX_PATH
|
||||||
@@ -128,11 +129,6 @@ endif()
|
|||||||
|
|
||||||
include( CMakeDependentOption )
|
include( CMakeDependentOption )
|
||||||
|
|
||||||
# Test if conan is installed
|
|
||||||
find_program(CONAN_CMD_TEST conan NO_CACHE)
|
|
||||||
cmake_dependent_option(USE_CONAN "Build without conan" ON "NOT CONAN_CMD_TEST STREQUAL CONAN_CMD_TEST-NOTFOUND" OFF)
|
|
||||||
message("Using conan: ${USE_CONAN}")
|
|
||||||
|
|
||||||
# Our very own project
|
# Our very own project
|
||||||
project( Tenacity )
|
project( Tenacity )
|
||||||
|
|
||||||
@@ -141,21 +137,6 @@ include( AudacityFunctions )
|
|||||||
|
|
||||||
set_from_env(AUDACITY_ARCH_LABEL) # e.g. x86_64
|
set_from_env(AUDACITY_ARCH_LABEL) # e.g. x86_64
|
||||||
|
|
||||||
# Allow user to globally set the library preference
|
|
||||||
cmd_option( ${_OPT}lib_preference
|
|
||||||
"Library preference [system (if available), local]"
|
|
||||||
"local"
|
|
||||||
STRINGS "system" "local"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Special mode, that will force dependencies to the packages provided by system unless they were set to local explicitly.
|
|
||||||
cmd_option( ${_OPT}obey_system_dependencies
|
|
||||||
"Use system packages to satisfy dependencies"
|
|
||||||
Off
|
|
||||||
)
|
|
||||||
|
|
||||||
include( AudacityDependencies )
|
|
||||||
|
|
||||||
# Pull all the modules we'll need
|
# Pull all the modules we'll need
|
||||||
include( CheckCXXCompilerFlag )
|
include( CheckCXXCompilerFlag )
|
||||||
include( CheckIncludeFile )
|
include( CheckIncludeFile )
|
||||||
@@ -511,11 +492,165 @@ endif()
|
|||||||
# Do this before consistency checks for added third-party libraries
|
# Do this before consistency checks for added third-party libraries
|
||||||
include( "src/Experimental.cmake" )
|
include( "src/Experimental.cmake" )
|
||||||
|
|
||||||
# Add our children
|
find_package(Threads REQUIRED)
|
||||||
add_subdirectory( "cmake-proxies" )
|
find_package(ZLIB REQUIRED)
|
||||||
|
find_package(EXPAT REQUIRED)
|
||||||
|
find_package(mp3lame REQUIRED)
|
||||||
|
find_package(SndFile REQUIRED)
|
||||||
|
find_package(Soxr REQUIRED)
|
||||||
|
find_package(SQLite3 REQUIRED)
|
||||||
|
find_package(PortAudio REQUIRED)
|
||||||
|
|
||||||
# Conan uses find_package and does not set GLOBAL flag
|
find_package(PortMidi)
|
||||||
resolve_conan_dependencies()
|
find_package(PortSMF)
|
||||||
|
cmake_dependent_option(MIDI "MIDI support requires PortMidi and PortSMF." ON "PortMidi_FOUND;PortSMF_FOUND" OFF)
|
||||||
|
if(MIDI)
|
||||||
|
set(USE_MIDI ON)
|
||||||
|
message(STATUS "MIDI support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "MIDI support disabled. Requires both PortMidi and PortSMF.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(id3tag)
|
||||||
|
cmake_dependent_option(ID3TAG "ID3 Tag support for MP3s." ON "id3tag_FOUND" OFF)
|
||||||
|
if(ID3TAG)
|
||||||
|
set(USE_LIBID3TAG ON)
|
||||||
|
message(STATUS "ID3 tag support for MP3s enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "ID3 tag support for MP3s disabled. Requires libid3tag.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(MAD)
|
||||||
|
cmake_dependent_option(MP3_DECODING "MP3 decoding support with libmad" ON "MAD_FOUND" OFF)
|
||||||
|
if(MP3_DECODING)
|
||||||
|
set(USE_LIBMAD ON)
|
||||||
|
message(STATUS "MP3 decoding support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "MP3 decoding support disabled. Requires libmad.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(libtwolame)
|
||||||
|
cmake_dependent_option(MP2 "MP2 support with Twolame" ON "libtwolame_FOUND" OFF)
|
||||||
|
if(MP2)
|
||||||
|
set(USE_LIBTWOLAME ON)
|
||||||
|
message(STATUS "MP2 encoding support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "MP2 encoding support disabled. Requires Twolame library.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(Ogg)
|
||||||
|
cmake_dependent_option(OGG "OGG container format support" ON "Ogg_FOUND" OFF)
|
||||||
|
if(OGG)
|
||||||
|
set(USE_LIBOGG ON)
|
||||||
|
message(STATUS "OGG container format support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "OGG container format support disabled. Requires libogg.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(Vorbis)
|
||||||
|
cmake_dependent_option(VORBIS "Vorbis codec support" ON "Vorbis_FOUND" OFF)
|
||||||
|
if(VORBIS)
|
||||||
|
set(USE_LIBVORBIS ON)
|
||||||
|
message(STATUS "Vorbis codec support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "Voribs codec support disabled. Requires libvorbis.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(FLAC++)
|
||||||
|
cmake_dependent_option(FLAC "FLAC codec support" ON "FLAC++_FOUND" OFF)
|
||||||
|
if(FLAC)
|
||||||
|
set(USE_LIBFLAC ON)
|
||||||
|
message(STATUS "FLAC codec support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "FLAC codec support disabled. Requires libflac and libflac++ C++ bindings.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# FIXME: requires vendored fork of PortMixer which requires vendored fork of PortAudio
|
||||||
|
# https://github.com/audacity/audacity/issues/840#issuecomment-837795388
|
||||||
|
#find_package(PortMixer)
|
||||||
|
#cmake_dependent_option(PORTMIXER "PortMixer support" ON "PortMixer_FOUND" OFF)
|
||||||
|
#if(PORTMIXER)
|
||||||
|
#set(USE_PORTMIXER ON)
|
||||||
|
#message(STATUS "PortMixer support enabled.")
|
||||||
|
#else()
|
||||||
|
#message(STATUS "PortMixer support disabled.")
|
||||||
|
#endif()
|
||||||
|
|
||||||
|
find_package(sbsms)
|
||||||
|
cmake_dependent_option(SBSMS "SBSMS timestretching" ON "sbsms_FOUND" OFF)
|
||||||
|
if(SBSMS)
|
||||||
|
set(USE_SBSMS ON)
|
||||||
|
message(STATUS "SBSMS timestretching support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "SBSMS timestretching support disabled. Requires libsbsms.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(SoundTouch)
|
||||||
|
cmake_dependent_option(SOUNDTOUCH "SoundTouch timestretching" ON "SoundTouch_FOUND" OFF)
|
||||||
|
if(SOUNDTOUCH)
|
||||||
|
set(USE_SOUNDTOUCH ON)
|
||||||
|
message(STATUS "SoundTouch timestretching support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "SoundTouch timestretching support disabled. Requires SoundTouch library.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(FFMPEG)
|
||||||
|
cmake_dependent_option(FFMPEG "FFMPEG codecs support." ON "FFMPEG_FOUND" OFF)
|
||||||
|
if(FFMPEG)
|
||||||
|
set(USE_FFMPEG ON)
|
||||||
|
message(STATUS "FFMPEG codecs support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "FFMPEG codecs support disabled. Requires FFMPEG libraries.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(VampHostSDK)
|
||||||
|
cmake_dependent_option(VAMP "VAMP plugin hosting." ON "VampHostSDK_FOUND" OFF)
|
||||||
|
if(VAMP)
|
||||||
|
set(USE_VAMP ON)
|
||||||
|
message(STATUS "VAMP plugin hosting enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "VAMP plugin hosting disabled. Requires VAMP host SDK.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(LV2)
|
||||||
|
find_package(lilv)
|
||||||
|
find_package(suil)
|
||||||
|
cmake_dependent_option(LV2 "LV2 plugin host support" ON "LV2_FOUND;lilv_FOUND;suil_FOUND" OFF)
|
||||||
|
if(LV2)
|
||||||
|
message(STATUS "LV2 plugin hosting enabled.")
|
||||||
|
set(USE_LV2 ON)
|
||||||
|
else()
|
||||||
|
message(STATUS "LV2 plugin hosting disabled. Requires LV2, lilv, and suil libraries.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(VST2 "VST2 plugin host support" ON)
|
||||||
|
if(VST2)
|
||||||
|
message(STATUS "VST2 plugin host support enabled.")
|
||||||
|
else()
|
||||||
|
message(STATUS "VST2 plugin host support disabled.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
|
||||||
|
find_package(GLIB REQUIRED)
|
||||||
|
find_package(GTK 3.0 REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(wxWidgets_CONFIG_OPTIONS --version=3.1)
|
||||||
|
find_package(wxWidgets 3.1 REQUIRED COMPONENTS adv base core html qa xml net)
|
||||||
|
include(${wxWidgets_USE_FILE})
|
||||||
|
# The FindwxWidgets.cmake module does not create an IMPORT target, so hack one together.
|
||||||
|
# This makes it easy to add the compile definitions to the lib-strings and lib-strings-utils targets.
|
||||||
|
if(NOT TARGET wxWidgets::wxWidgets)
|
||||||
|
add_library(wxWidgets::wxWidgets INTERFACE IMPORTED)
|
||||||
|
target_link_libraries(wxWidgets::wxWidgets INTERFACE ${wxWidgets_LIBRARIES})
|
||||||
|
target_compile_definitions(wxWidgets::wxWidgets INTERFACE ${wxWidgets_DEFINITIONS} ${wxWidgets_DEFINITIONS_DEBUG})
|
||||||
|
if(WIN32)
|
||||||
|
target_compile_definitions(wxWidgets::wxWidgets INTERFACE WXUSINGDLL)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(lib-src/libnyquist)
|
||||||
|
set(USE_NYQUIST ON)
|
||||||
|
|
||||||
add_subdirectory( "help" )
|
add_subdirectory( "help" )
|
||||||
add_subdirectory( "images" )
|
add_subdirectory( "images" )
|
||||||
|
|||||||
183
cmake-modules/FindFFMPEG.cmake
Normal file
183
cmake-modules/FindFFMPEG.cmake
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
#.rst:
|
||||||
|
# FindFFMPEG
|
||||||
|
# ----------
|
||||||
|
#
|
||||||
|
# Try to find the required ffmpeg components (default: libavformat, libavutil, libavcodec)
|
||||||
|
#
|
||||||
|
# Next variables can be used to hint FFMPEG libs search:
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# PC_<component>_LIBRARY_DIRS
|
||||||
|
# PC_FFMPEG_LIBRARY_DIRS
|
||||||
|
# PC_<component>_INCLUDE_DIRS
|
||||||
|
# PC_FFMPEG_INCLUDE_DIRS
|
||||||
|
#
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# FFMPEG_FOUND - System has the all required components.
|
||||||
|
# FFMPEG_INCLUDE_DIRS - Include directory necessary for using the required components headers.
|
||||||
|
# FFMPEG_LIBRARIES - Link these to use the required ffmpeg components.
|
||||||
|
# FFMPEG_DEFINITIONS - Compiler switches required for using the required ffmpeg components.
|
||||||
|
#
|
||||||
|
# For each of the components it will additionally set.
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# libavcodec
|
||||||
|
# libavdevice
|
||||||
|
# libavformat
|
||||||
|
# libavfilter
|
||||||
|
# libavutil
|
||||||
|
# libpostproc
|
||||||
|
# libswscale
|
||||||
|
# libswresample
|
||||||
|
#
|
||||||
|
# the following variables will be defined
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# <component>_FOUND - System has <component>
|
||||||
|
# <component>_INCLUDE_DIRS - Include directory necessary for using the <component> headers
|
||||||
|
# <component>_LIBRARIES - Link these to use <component>
|
||||||
|
# <component>_DEFINITIONS - Compiler switches required for using <component>
|
||||||
|
# <component>_VERSION - The components version
|
||||||
|
#
|
||||||
|
# the following import targets is created
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# FFMPEG::FFMPEG - for all components
|
||||||
|
# FFMPEG::<component> - where <component> in lower case (FFMPEG::avcodec) for each components
|
||||||
|
#
|
||||||
|
# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org>
|
||||||
|
# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
|
||||||
|
# Copyright (c) 2011, Michael Jansen, <kde@michael-jansen.biz>
|
||||||
|
# Copyright (c) 2017, Alexander Drozdov, <adrozdoff@gmail.com>
|
||||||
|
# Copyright (c) 2019, Jan Holthuis, <holthuis.jan@googlemail.com>
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||||
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
# The default components were taken from a survey over other FindFFMPEG.cmake files
|
||||||
|
if (NOT FFMPEG_FIND_COMPONENTS)
|
||||||
|
set(FFMPEG_FIND_COMPONENTS libavcodec libavformat libavutil)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
#
|
||||||
|
### Macro: find_component
|
||||||
|
#
|
||||||
|
# Checks for the given component by invoking pkgconfig and then looking up the libraries and
|
||||||
|
# include directories.
|
||||||
|
#
|
||||||
|
macro(find_component _component _pkgconfig _library _header)
|
||||||
|
|
||||||
|
# use pkg-config to get the directories and then use these values
|
||||||
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_FFMPEG_${_component} QUIET ${_pkgconfig})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
find_path(FFMPEG_${_component}_INCLUDE_DIRS ${_header}
|
||||||
|
HINTS
|
||||||
|
${PC_FFMPEG_${_component}_INCLUDEDIR}
|
||||||
|
${PC_FFMPEG_${_component}_INCLUDE_DIRS}
|
||||||
|
${PC_FFMPEG_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
ffmpeg
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(FFMPEG_${_component}_LIBRARIES NAMES ${PC_FFMPEG_${_component}_LIBRARIES} ${_library}
|
||||||
|
HINTS
|
||||||
|
${PC_FFMPEG_${_component}_LIBDIR}
|
||||||
|
${PC_FFMPEG_${_component}_LIBRARY_DIRS}
|
||||||
|
${PC_FFMPEG_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
message(STATUS ${FFMPEG_${_component}_LIBRARIES})
|
||||||
|
message(STATUS ${PC_FFMPEG_${_component}_LIBRARIES})
|
||||||
|
|
||||||
|
set(FFMPEG_${_component}_DEFINITIONS ${PC_FFMPEG_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.")
|
||||||
|
set(FFMPEG_${_component}_VERSION ${PC_FFMPEG_${_component}_VERSION} CACHE STRING "The ${_component} version number.")
|
||||||
|
|
||||||
|
if (FFMPEG_${_component}_LIBRARIES AND FFMPEG_${_component}_INCLUDE_DIRS)
|
||||||
|
message(STATUS " - ${_component} ${FFMPEG_${_component}_VERSION} found.")
|
||||||
|
set(FFMPEG_${_component}_FOUND TRUE)
|
||||||
|
else ()
|
||||||
|
message(STATUS " - ${_component} not found.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
FFMPEG_${_component}_INCLUDE_DIRS
|
||||||
|
FFMPEG_${_component}_LIBRARIES
|
||||||
|
FFMPEG_${_component}_DEFINITIONS
|
||||||
|
FFMPEG_${_component}_VERSION)
|
||||||
|
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
message(STATUS "Searching for FFMPEG components")
|
||||||
|
# Check for all possible component.
|
||||||
|
find_component(libavcodec libavcodec avcodec libavcodec/avcodec.h)
|
||||||
|
find_component(libavformat libavformat avformat libavformat/avformat.h)
|
||||||
|
find_component(libavdevice libavdevice avdevice libavdevice/avdevice.h)
|
||||||
|
find_component(libavutil libavutil avutil libavutil/avutil.h)
|
||||||
|
find_component(libavfilter libavfilter avfilter libavfilter/avfilter.h)
|
||||||
|
find_component(libswscale libswscale swscale libswscale/swscale.h)
|
||||||
|
find_component(libpostproc libpostproc postproc libpostproc/postprocess.h)
|
||||||
|
find_component(libswresample libswresample swresample libswresample/swresample.h)
|
||||||
|
|
||||||
|
set(FFMPEG_LIBRARIES "")
|
||||||
|
set(FFMPEG_DEFINITIONS "")
|
||||||
|
# Check if the required components were found and add their stuff to the FFMPEG_* vars.
|
||||||
|
foreach (_component ${FFMPEG_FIND_COMPONENTS})
|
||||||
|
if (FFMPEG_${_component}_FOUND)
|
||||||
|
#message(STATUS "Required component ${_component} present.")
|
||||||
|
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_${_component}_LIBRARIES})
|
||||||
|
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${FFMPEG_${_component}_DEFINITIONS})
|
||||||
|
list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_${_component}_INCLUDE_DIRS})
|
||||||
|
string(TOLOWER ${_component} _lowerComponent)
|
||||||
|
if (NOT TARGET FFMPEG::${_lowerComponent})
|
||||||
|
add_library(FFMPEG::${_lowerComponent} INTERFACE IMPORTED)
|
||||||
|
set_target_properties(FFMPEG::${_lowerComponent} PROPERTIES
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${${_component}_DEFINITIONS}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${${_component}_INCLUDE_DIRS}"
|
||||||
|
INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
# Build the include path with duplicates removed.
|
||||||
|
if (FFMPEG_INCLUDE_DIRS)
|
||||||
|
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# cache the vars.
|
||||||
|
set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "The FFMPEG include directories." FORCE)
|
||||||
|
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "The FFMPEG libraries." FORCE)
|
||||||
|
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} CACHE STRING "The FFMPEG cflags." FORCE)
|
||||||
|
|
||||||
|
mark_as_advanced(FFMPEG_INCLUDE_DIRS
|
||||||
|
FFMPEG_LIBRARIES
|
||||||
|
FFMPEG_DEFINITIONS)
|
||||||
|
|
||||||
|
if (NOT TARGET FFMPEG::FFMPEG)
|
||||||
|
add_library(FFMPEG::FFMPEG INTERFACE IMPORTED)
|
||||||
|
set_target_properties(FFMPEG::FFMPEG PROPERTIES
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${FFMPEG_DEFINITIONS}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIRS}"
|
||||||
|
INTERFACE_LINK_LIBRARIES "${FFMPEG_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Compile the list of required vars
|
||||||
|
set(_FFMPEG_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
|
||||||
|
foreach (_component ${FFMPEG_FIND_COMPONENTS})
|
||||||
|
list(APPEND _FFMPEG_REQUIRED_VARS FFMPEG_${_component}_LIBRARIES FFMPEG_${_component}_INCLUDE_DIRS)
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
# Give a nice error message if some of the required vars are missing.
|
||||||
|
find_package_handle_standard_args(FFMPEG DEFAULT_MSG ${_FFMPEG_REQUIRED_VARS})
|
||||||
88
cmake-modules/FindFLAC++.cmake
Normal file
88
cmake-modules/FindFLAC++.cmake
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# 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:
|
||||||
|
FindFLAC++
|
||||||
|
--------
|
||||||
|
|
||||||
|
Finds the FLAC++ library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``FLAC++::FLAC++``
|
||||||
|
The FLAC++ library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``FLAC++_FOUND``
|
||||||
|
True if the system has the FLAC++ library.
|
||||||
|
``FLAC++_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use FLAC++.
|
||||||
|
``FLAC++_LIBRARIES``
|
||||||
|
Libraries needed to link to FLAC++.
|
||||||
|
``FLAC++_DEFINITIONS``
|
||||||
|
Compile definitions needed to use FLAC++.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``FLAC++_INCLUDE_DIR``
|
||||||
|
The directory containing ``FLAC++/all.h``.
|
||||||
|
``FLAC++_LIBRARY``
|
||||||
|
The path to the FLAC++ library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(FLAC REQUIRED)
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_FLAC++ QUIET flac++)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(FLAC++_INCLUDE_DIR
|
||||||
|
NAMES FLAC++/all.h
|
||||||
|
PATHS ${PC_FLAC++_INCLUDE_DIRS}
|
||||||
|
DOC "FLAC++ include directory")
|
||||||
|
mark_as_advanced(FLAC++_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(FLAC++_LIBRARY
|
||||||
|
NAMES FLAC++
|
||||||
|
PATHS ${PC_FLAC++_LIBRARY_DIRS}
|
||||||
|
DOC "FLAC++ library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(FLAC++_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
FLAC++
|
||||||
|
DEFAULT_MSG
|
||||||
|
FLAC++_LIBRARY
|
||||||
|
FLAC++_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(FLAC++_FOUND)
|
||||||
|
set(FLAC++_LIBRARIES "${FLAC++_LIBRARY}")
|
||||||
|
set(FLAC++_INCLUDE_DIRS "${FLAC++_INCLUDE_DIR}")
|
||||||
|
set(FLAC++_DEFINITIONS ${PC_FLAC++_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET FLAC++::FLAC++)
|
||||||
|
add_library(FLAC++::FLAC++ UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(FLAC++::FLAC++
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${FLAC++_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_FLAC++_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${FLAC++_INCLUDE_DIR}"
|
||||||
|
INTERFACE_LINK_LIBRARIES FLAC::FLAC
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
85
cmake-modules/FindFLAC.cmake
Normal file
85
cmake-modules/FindFLAC.cmake
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# 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 file for details.
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindFLAC
|
||||||
|
--------
|
||||||
|
|
||||||
|
Finds the FLAC library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``FLAC::FLAC``
|
||||||
|
The FLAC library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``FLAC_FOUND``
|
||||||
|
True if the system has the FLAC library.
|
||||||
|
``FLAC_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use FLAC.
|
||||||
|
``FLAC_LIBRARIES``
|
||||||
|
Libraries needed to link to FLAC.
|
||||||
|
``FLAC_DEFINITIONS``
|
||||||
|
Compile definitions needed to use FLAC.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``FLAC_INCLUDE_DIR``
|
||||||
|
The directory containing ``FLAC/all.h``.
|
||||||
|
``FLAC_LIBRARY``
|
||||||
|
The path to the FLAC library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_FLAC QUIET flac)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(FLAC_INCLUDE_DIR
|
||||||
|
NAMES FLAC/all.h
|
||||||
|
PATHS ${PC_FLAC_INCLUDE_DIRS}
|
||||||
|
DOC "FLAC include directory")
|
||||||
|
mark_as_advanced(FLAC_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(FLAC_LIBRARY
|
||||||
|
NAMES FLAC
|
||||||
|
PATHS ${PC_FLAC_LIBRARY_DIRS}
|
||||||
|
DOC "FLAC library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(FLAC_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
FLAC
|
||||||
|
DEFAULT_MSG
|
||||||
|
FLAC_LIBRARY
|
||||||
|
FLAC_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(FLAC_FOUND)
|
||||||
|
set(FLAC_LIBRARIES "${FLAC_LIBRARY}")
|
||||||
|
set(FLAC_INCLUDE_DIRS "${FLAC_INCLUDE_DIR}")
|
||||||
|
set(FLAC_DEFINITIONS ${PC_FLAC_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET FLAC::FLAC)
|
||||||
|
add_library(FLAC::FLAC UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(FLAC::FLAC
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${FLAC_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_FLAC_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
124
cmake-modules/FindGLIB.cmake
Normal file
124
cmake-modules/FindGLIB.cmake
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
# - Try to find Glib and its components (gio, gobject etc)
|
||||||
|
# Once done, this will define
|
||||||
|
#
|
||||||
|
# GLIB_FOUND - system has Glib
|
||||||
|
# GLIB_INCLUDE_DIRS - the Glib include directories
|
||||||
|
# GLIB_LIBRARIES - link these to use Glib
|
||||||
|
#
|
||||||
|
# Optionally, the COMPONENTS keyword can be passed to find_package()
|
||||||
|
# and Glib components can be looked for. Currently, the following
|
||||||
|
# components can be used, and they define the following variables if
|
||||||
|
# found:
|
||||||
|
#
|
||||||
|
# gio: GLIB_GIO_LIBRARIES
|
||||||
|
# gobject: GLIB_GOBJECT_LIBRARIES
|
||||||
|
# gmodule: GLIB_GMODULE_LIBRARIES
|
||||||
|
# gthread: GLIB_GTHREAD_LIBRARIES
|
||||||
|
#
|
||||||
|
# Note that the respective _INCLUDE_DIR variables are not set, since
|
||||||
|
# all headers are in the same directory as GLIB_INCLUDE_DIRS.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||||
|
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_GLIB QUIET glib-2.0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_library(GLIB_LIBRARIES
|
||||||
|
NAMES glib-2.0
|
||||||
|
HINTS ${PC_GLIB_LIBDIR}
|
||||||
|
${PC_GLIB_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Files in glib's main include path may include glibconfig.h, which,
|
||||||
|
# for some odd reason, is normally in $LIBDIR/glib-2.0/include.
|
||||||
|
get_filename_component(_GLIB_LIBRARY_DIR ${GLIB_LIBRARIES} PATH)
|
||||||
|
find_path(GLIBCONFIG_INCLUDE_DIR
|
||||||
|
NAMES glibconfig.h
|
||||||
|
HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${_GLIB_LIBRARY_DIR}
|
||||||
|
${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES glib-2.0/include
|
||||||
|
)
|
||||||
|
|
||||||
|
find_path(GLIB_INCLUDE_DIR
|
||||||
|
NAMES glib.h
|
||||||
|
HINTS ${PC_GLIB_INCLUDEDIR}
|
||||||
|
${PC_GLIB_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES glib-2.0
|
||||||
|
)
|
||||||
|
|
||||||
|
set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR})
|
||||||
|
|
||||||
|
# Version detection
|
||||||
|
if (EXISTS "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h")
|
||||||
|
file(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS)
|
||||||
|
string(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
|
||||||
|
set(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||||
|
string(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
|
||||||
|
set(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}")
|
||||||
|
string(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
|
||||||
|
set(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}")
|
||||||
|
set(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Additional Glib components. We only look for libraries, as not all of them
|
||||||
|
# have corresponding headers and all headers are installed alongside the main
|
||||||
|
# glib ones.
|
||||||
|
foreach (_component ${GLIB_FIND_COMPONENTS})
|
||||||
|
if (${_component} STREQUAL "gio")
|
||||||
|
find_library(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR})
|
||||||
|
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES)
|
||||||
|
elseif (${_component} STREQUAL "gobject")
|
||||||
|
find_library(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR})
|
||||||
|
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES)
|
||||||
|
elseif (${_component} STREQUAL "gmodule")
|
||||||
|
find_library(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR})
|
||||||
|
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES)
|
||||||
|
elseif (${_component} STREQUAL "gthread")
|
||||||
|
find_library(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR})
|
||||||
|
set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES)
|
||||||
|
elseif (${_component} STREQUAL "gio-unix")
|
||||||
|
# gio-unix is compiled as part of the gio library, but the include paths
|
||||||
|
# are separate from the shared glib ones. Since this is currently only used
|
||||||
|
# by WebKitGTK we don't go to extraordinary measures beyond pkg-config.
|
||||||
|
pkg_check_modules(GIO_UNIX QUIET gio-unix-2.0)
|
||||||
|
endif ()
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLIB REQUIRED_VARS GLIB_INCLUDE_DIRS GLIB_LIBRARIES ${ADDITIONAL_REQUIRED_VARS}
|
||||||
|
VERSION_VAR GLIB_VERSION)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
GLIBCONFIG_INCLUDE_DIR
|
||||||
|
GLIB_GIO_LIBRARIES
|
||||||
|
GLIB_GIO_UNIX_LIBRARIES
|
||||||
|
GLIB_GMODULE_LIBRARIES
|
||||||
|
GLIB_GOBJECT_LIBRARIES
|
||||||
|
GLIB_GTHREAD_LIBRARIES
|
||||||
|
GLIB_INCLUDE_DIR
|
||||||
|
GLIB_INCLUDE_DIRS
|
||||||
|
GLIB_LIBRARIES
|
||||||
|
)
|
||||||
150
cmake-modules/FindGTK.cmake
Normal file
150
cmake-modules/FindGTK.cmake
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
# - Try to find GTK+ 3.x or 4.x
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
|
||||||
|
# Copyright (C) 2013, 2015, 2020 Igalia S.L.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||||
|
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindGTK
|
||||||
|
-------
|
||||||
|
|
||||||
|
Find GTK headers and libraries.
|
||||||
|
|
||||||
|
Optional Components
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The ``COMPONENTS`` (or ``OPTIONAL_COMPONENTS``) keyword can be passed to
|
||||||
|
``find_package()``, the following GTK components can be searched for:
|
||||||
|
|
||||||
|
- ``unix-print``
|
||||||
|
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``GTK::GTK``
|
||||||
|
The GTK library, if found.
|
||||||
|
``GTK::UnixPrint``
|
||||||
|
The GTK unix-print library, if found.
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables in your project:
|
||||||
|
|
||||||
|
``GTK_FOUND``
|
||||||
|
true if (the requested version of) GTK is available.
|
||||||
|
``GTK_UNIX_PRINT_FOUND``
|
||||||
|
true if the ``unix-print`` component is available.
|
||||||
|
``GTK_4``
|
||||||
|
whether GTK 4 was detected
|
||||||
|
``GTK_3``
|
||||||
|
whether GTK 3 was detected
|
||||||
|
``GTK_VERSION``
|
||||||
|
the version of GTK.
|
||||||
|
``GTK_SUPPORTS_BROADWAY``
|
||||||
|
true if the Broadway target is built into GTK.
|
||||||
|
``GTK_SUPPORTS_QUARTZ``
|
||||||
|
true if the Quartz target is built into GTK.
|
||||||
|
``GTK_SUPPORTS_WAYLAND``
|
||||||
|
true if the Wayland target is built into GTK.
|
||||||
|
``GTK_SUPPORTS_WIN32``
|
||||||
|
true if the Windows target is built into GTK.
|
||||||
|
``GTK_SUPPORTS_X11``
|
||||||
|
true if the X11 target is built into GTK.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if (NOT DEFINED GTK_FIND_VERSION)
|
||||||
|
message(FATAL_ERROR "No GTK version specified")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (GTK_FIND_VERSION VERSION_LESS 3.90)
|
||||||
|
set(GTK_PC_MODULE "gtk+-3.0")
|
||||||
|
set(GTK_PC_UNIX_PRINT_MODULE "gtk+-unix-print-3.0")
|
||||||
|
set(GTK_4 FALSE)
|
||||||
|
set(GTK_3 TRUE)
|
||||||
|
else ()
|
||||||
|
set(GTK_PC_MODULE "gtk4")
|
||||||
|
set(GTK_PC_UNIX_PRINT_MODULE "gtk4-unix-print")
|
||||||
|
set(GTK_4 TRUE)
|
||||||
|
set(GTK_3 FALSE)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_check_modules(GTK IMPORTED_TARGET ${GTK_PC_MODULE})
|
||||||
|
|
||||||
|
set(GTK_VERSION_OK TRUE)
|
||||||
|
if (GTK_VERSION)
|
||||||
|
if (GTK_FIND_VERSION_EXACT)
|
||||||
|
if (NOT("${GTK_FIND_VERSION}" VERSION_EQUAL "${GTK_VERSION}"))
|
||||||
|
set(GTK_VERSION_OK FALSE)
|
||||||
|
endif ()
|
||||||
|
else ()
|
||||||
|
if ("${GTK_VERSION}" VERSION_LESS "${GTK_FIND_VERSION}")
|
||||||
|
set(GTK_VERSION_OK FALSE)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Set all the GTK_SUPPORTS_<target> variables to FALSE initially.
|
||||||
|
foreach (gtk_target broadway quartz wayland win32 x11)
|
||||||
|
string(TOUPPER "GTK_SUPPORTS_${gtk_target}" gtk_target)
|
||||||
|
set(${gtk_target} FALSE)
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
if (GTK_VERSION AND GTK_VERSION_OK)
|
||||||
|
# Fetch the "targets" variable and set GTK_SUPPORTS_<target>.
|
||||||
|
pkg_get_variable(GTK_TARGETS ${GTK_PC_MODULE} targets)
|
||||||
|
separate_arguments(GTK_TARGETS)
|
||||||
|
foreach (gtk_target ${GTK_TARGETS})
|
||||||
|
string(TOUPPER "GTK_SUPPORTS_${gtk_target}" gtk_target)
|
||||||
|
set(${gtk_target} TRUE)
|
||||||
|
endforeach ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (TARGET PkgConfig::GTK AND NOT TARGET GTK::GTK)
|
||||||
|
add_library(GTK::GTK INTERFACE IMPORTED GLOBAL)
|
||||||
|
set_property(TARGET GTK::GTK PROPERTY
|
||||||
|
INTERFACE_LINK_LIBRARIES PkgConfig::GTK
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Try to find additional components
|
||||||
|
foreach (gtk_component ${GTK_FIND_COMPONENTS})
|
||||||
|
if (NOT "${gtk_component}" STREQUAL unix-print)
|
||||||
|
message(FATAL_ERROR "Invalid component name: ${gtk_component}")
|
||||||
|
endif ()
|
||||||
|
pkg_check_modules(GTK_UNIX_PRINT IMPORTED_TARGET "${GTK_PC_UNIX_PRINT_MODULE}")
|
||||||
|
if (GTK_FIND_REQUIRED_unix-print AND NOT GTK_UNIX_PRINT_FOUND)
|
||||||
|
message(FATAL_ERROR "Component unix-print not found")
|
||||||
|
endif ()
|
||||||
|
if (TARGET PkgConfig::GTK_UNIX_PRINT AND NOT TARGET GTK::UnixPrint)
|
||||||
|
add_library(GTK::UnixPrint INTERFACE IMPORTED GLOBAL)
|
||||||
|
set_property(TARGET GTK::UnixPrint PROPERTY
|
||||||
|
INTERFACE_LINK_LIBRARIES PkgConfig::GTK_UNIX_PRINT)
|
||||||
|
endif ()
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK DEFAULT_MSG GTK_VERSION GTK_VERSION_OK)
|
||||||
68
cmake-modules/FindLV2.cmake
Normal file
68
cmake-modules/FindLV2.cmake
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindLV2
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Finds the LV2 library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``LV2::LV2``
|
||||||
|
The LV2 library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``LV2_FOUND``
|
||||||
|
True if the system has the LV2 library.
|
||||||
|
``LV2_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use LV2.
|
||||||
|
``LV2_LIBRARIES``
|
||||||
|
Libraries needed to link to LV2.
|
||||||
|
``LV2_DEFINITIONS``
|
||||||
|
Compile definitions needed to use LV2.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``LV2_INCLUDE_DIR``
|
||||||
|
The directory containing ``lv2.h``.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_LV2 QUIET lv2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# There is no library; only a header.
|
||||||
|
find_path(LV2_INCLUDE_DIR
|
||||||
|
NAMES lv2.h
|
||||||
|
PATHS ${PC_LV2_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES LV2
|
||||||
|
DOC "LV2 include directory")
|
||||||
|
mark_as_advanced(LV2_INCLUDE_DIR)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
LV2
|
||||||
|
DEFAULT_MSG
|
||||||
|
LV2_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(LV2_FOUND)
|
||||||
|
if(NOT TARGET LV2::LV2)
|
||||||
|
add_library(LV2::LV2 INTERFACE IMPORTED)
|
||||||
|
set_target_properties(LV2::LV2
|
||||||
|
PROPERTIES
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_LV2_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${LV2_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
86
cmake-modules/FindMAD.cmake
Normal file
86
cmake-modules/FindMAD.cmake
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
# 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:
|
||||||
|
FindMAD
|
||||||
|
-------
|
||||||
|
|
||||||
|
Finds the MAD library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``MAD::MAD``
|
||||||
|
The MAD library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``MAD_FOUND``
|
||||||
|
True if the system has the MAD library.
|
||||||
|
``MAD_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use MAD.
|
||||||
|
``MAD_LIBRARIES``
|
||||||
|
Libraries needed to link to MAD.
|
||||||
|
``MAD_DEFINITIONS``
|
||||||
|
Compile definitions needed to use MAD.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``MAD_INCLUDE_DIR``
|
||||||
|
The directory containing ``mad.h``.
|
||||||
|
``MAD_LIBRARY``
|
||||||
|
The path to the MAD library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_MAD QUIET mad)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(MAD_INCLUDE_DIR
|
||||||
|
NAMES mad.h
|
||||||
|
PATHS ${PC_MAD_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES mad
|
||||||
|
DOC "MAD include directory")
|
||||||
|
mark_as_advanced(MAD_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(MAD_LIBRARY
|
||||||
|
NAMES mad
|
||||||
|
PATHS ${PC_MAD_LIBRARY_DIRS}
|
||||||
|
DOC "MAD library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(MAD_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
MAD
|
||||||
|
DEFAULT_MSG
|
||||||
|
MAD_LIBRARY
|
||||||
|
MAD_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(MAD_FOUND)
|
||||||
|
set(MAD_LIBRARIES "${MAD_LIBRARY}")
|
||||||
|
set(MAD_INCLUDE_DIRS "${MAD_INCLUDE_DIR}")
|
||||||
|
set(MAD_DEFINITIONS ${PC_MAD_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET MAD::MAD)
|
||||||
|
add_library(MAD::MAD UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(MAD::MAD
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${MAD_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_MAD_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${MAD_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
77
cmake-modules/FindOgg.cmake
Normal file
77
cmake-modules/FindOgg.cmake
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
# 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()
|
||||||
57
cmake-modules/FindPortAudio.cmake
Normal file
57
cmake-modules/FindPortAudio.cmake
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# 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:
|
||||||
|
FindPortAudio
|
||||||
|
--------
|
||||||
|
|
||||||
|
Finds the PortAudio library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``PortAudio::PortAudio``
|
||||||
|
The PortAudio library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``PortAudio_FOUND``
|
||||||
|
True if the system has the PortAudio library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PortAudio portaudio-2.0)
|
||||||
|
else()
|
||||||
|
find_path(PortAudio_INCLUDEDIR
|
||||||
|
NAMES portaudio.h
|
||||||
|
DOC "PortAudio include directory")
|
||||||
|
|
||||||
|
find_library(PortAudio_LINK_LIBRARIES
|
||||||
|
NAMES portaudio
|
||||||
|
DOC "PortAudio library"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
PortAudio
|
||||||
|
DEFAULT_MSG
|
||||||
|
PortAudio_LINK_LIBRARIES
|
||||||
|
PortAudio_INCLUDEDIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(PortAudio_FOUND)
|
||||||
|
if(NOT TARGET PortAudio::PortAudio)
|
||||||
|
add_library(PortAudio::PortAudio INTERFACE IMPORTED)
|
||||||
|
target_link_libraries(PortAudio::PortAudio INTERFACE "${PortAudio_LINK_LIBRARIES}")
|
||||||
|
target_include_directories(PortAudio::PortAudio INTERFACE "${PortAudio_INCLUDEDIR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
73
cmake-modules/FindPortMidi.cmake
Normal file
73
cmake-modules/FindPortMidi.cmake
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
# 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:
|
||||||
|
FindPortMidi
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Finds the PortMidi library.
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``PortMidi_FOUND``
|
||||||
|
True if the system has the PortMidi library.
|
||||||
|
``PortMidi_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use PortMidi.
|
||||||
|
``PortMidi_LIBRARIES``
|
||||||
|
Libraries needed to link to PortMidi.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``PortMidi_INCLUDE_DIR``
|
||||||
|
The directory containing ``portmidi.h``.
|
||||||
|
``PortTime_INCLUDE_DIR``
|
||||||
|
The directory containing ``porttime.h``.
|
||||||
|
``PortMidi_LIBRARY``
|
||||||
|
The path to the PortMidi library.
|
||||||
|
``PortTime_LIBRARY``
|
||||||
|
The path to the PortTime library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_path(PortMidi_INCLUDE_DIR
|
||||||
|
NAMES portmidi.h
|
||||||
|
PATH_SUFFIXES portmidi
|
||||||
|
DOC "PortMidi include directory")
|
||||||
|
mark_as_advanced(PortMidi_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(PortMidi_LIBRARY
|
||||||
|
NAMES portmidi portmidi_s
|
||||||
|
DOC "PortMidi library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(PortMidi_LIBRARY)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
PortMidi
|
||||||
|
DEFAULT_MSG
|
||||||
|
PortMidi_LIBRARY
|
||||||
|
PortMidi_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
find_package(PortTime)
|
||||||
|
|
||||||
|
if(PortMidi_FOUND)
|
||||||
|
if(NOT TARGET PortMidi::PortMidi)
|
||||||
|
add_library(PortMidi::PortMidi UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(PortMidi::PortMidi
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${PortMidi_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${PortMidi_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(PortTime_FOUND)
|
||||||
|
target_link_libraries(PortMidi::PortMidi INTERFACE PortMidi::PortTime)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
83
cmake-modules/FindPortSMF.cmake
Normal file
83
cmake-modules/FindPortSMF.cmake
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindPortSMF
|
||||||
|
-------
|
||||||
|
|
||||||
|
Finds the PortSMF library.
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``PortSMF_FOUND``
|
||||||
|
True if the system has the PortSMF library.
|
||||||
|
``PortSMF_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use PortSMF.
|
||||||
|
``PortSMF_LIBRARIES``
|
||||||
|
Libraries needed to link to PortSMF.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``PortSMF_INCLUDE_DIR``
|
||||||
|
The directory containing ``PortSMF/PortSMF.h``.
|
||||||
|
``PortSMF_LIBRARY``
|
||||||
|
The path to the PortSMF library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PortSMF QUIET portSMF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Arch installs to portsmf directory
|
||||||
|
find_path(PortSMF_INCLUDE_DIR
|
||||||
|
NAMES portsmf/allegro.h
|
||||||
|
PATHS ${PortSMF_INCLUDE_DIRS}
|
||||||
|
DOC "PortSMF include directory"
|
||||||
|
)
|
||||||
|
if(NOT PortSMF_INCLUDE_DIR)
|
||||||
|
# Debian installs to portSMF directory with capital SMF
|
||||||
|
find_path(PortSMF_INCLUDE_DIR
|
||||||
|
NAMES portSMF/allegro.h
|
||||||
|
PATHS ${PortSMF_INCLUDE_DIRS}
|
||||||
|
DOC "PortSMF include directory"
|
||||||
|
)
|
||||||
|
if(PortSMF_INCLUDE_DIR)
|
||||||
|
set(PORTSMF_CAPITAL 1 CACHE INTERNAL "")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(PortSMF_INCLUDE_DIR)
|
||||||
|
|
||||||
|
# Both Arch and Debian name the library portSMF with capital SMF
|
||||||
|
find_library(PortSMF_LIBRARY
|
||||||
|
NAMES portSMF
|
||||||
|
PATHS ${PortSMF_LIBRARY_DIRS}
|
||||||
|
DOC "PortSMF library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(PortSMF_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
PortSMF
|
||||||
|
REQUIRED_VARS
|
||||||
|
PortSMF_LIBRARY
|
||||||
|
PortSMF_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(PortSMF_FOUND)
|
||||||
|
set(PortSMF_LIBRARIES ${PortSMF_LIBRARY})
|
||||||
|
set(PortSMF_INCLUDE_DIRS ${PortSMF_INCLUDE_DIR})
|
||||||
|
|
||||||
|
if(NOT TARGET PortSMF::PortSMF)
|
||||||
|
add_library(PortSMF::PortSMF INTERFACE IMPORTED)
|
||||||
|
target_link_libraries(PortSMF::PortSMF INTERFACE "${PortSMF_LIBRARY}")
|
||||||
|
target_include_directories(PortSMF::PortSMF INTERFACE "${PortSMF_INCLUDE_DIR}")
|
||||||
|
if(PORTSMF_CAPITAL)
|
||||||
|
target_compile_definitions(PortSMF::PortSMF INTERFACE PORTSMF_CAPITAL)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
62
cmake-modules/FindPortTime.cmake
Normal file
62
cmake-modules/FindPortTime.cmake
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# 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:
|
||||||
|
FindPortTime
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Finds the PortTime library.
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``PortTime_FOUND``
|
||||||
|
True if the system has the PortTime library.
|
||||||
|
``PortTime_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use PortTime.
|
||||||
|
``PortTime_LIBRARIES``
|
||||||
|
Libraries needed to link to PortTime.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``PortTime_INCLUDE_DIR``
|
||||||
|
The directory containing ``porttime.h``.
|
||||||
|
``PortTime_LIBRARY``
|
||||||
|
The path to the PortTime library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_library(PortTime_LIBRARY
|
||||||
|
NAMES porttime
|
||||||
|
DOC "PortTime library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(PortTime_LIBRARY)
|
||||||
|
|
||||||
|
find_path(PortTime_INCLUDE_DIR
|
||||||
|
NAMES porttime.h
|
||||||
|
PATH_SUFFIXES portmidi porttime
|
||||||
|
DOC "PortTime include directory")
|
||||||
|
mark_as_advanced(PortTime_INCLUDE_DIR)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
PortTime
|
||||||
|
DEFAULT_MSG
|
||||||
|
PortTime_LIBRARY
|
||||||
|
PortTime_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT TARGET PortMidi::PortTime)
|
||||||
|
add_library(PortMidi::PortTime UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(PortMidi::PortTime
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${PortTime_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${PortTime_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
86
cmake-modules/FindSQLite3.cmake
Normal file
86
cmake-modules/FindSQLite3.cmake
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
# 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:
|
||||||
|
FindSQLite3
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Finds the SQLite3 library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``SQLite3::SQLite3``
|
||||||
|
The SQLite3 library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``SQLite3_FOUND``
|
||||||
|
True if the system has the SQLite3 library.
|
||||||
|
``SQLite3_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use SQLite3.
|
||||||
|
``SQLite3_LIBRARIES``
|
||||||
|
Libraries needed to link to SQLite3.
|
||||||
|
``SQLite3_DEFINITIONS``
|
||||||
|
Compile definitions needed to use SQLite3.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``SQLite3_INCLUDE_DIR``
|
||||||
|
The directory containing ``sqlite3.h``.
|
||||||
|
``SQLite3_LIBRARY``
|
||||||
|
The path to the SQLite3 library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_SQLite3 QUIET sqlite3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(SQLite3_INCLUDE_DIR
|
||||||
|
NAMES sqlite3.h
|
||||||
|
PATHS ${PC_SQLite3_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES sqlite sqlite3
|
||||||
|
DOC "SQLite3 include directory")
|
||||||
|
mark_as_advanced(SQLite3_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(SQLite3_LIBRARY
|
||||||
|
NAMES sqlite3
|
||||||
|
PATHS ${PC_SQLite3_LIBRARY_DIRS}
|
||||||
|
DOC "SQLite3 library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(SQLite3_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
SQLite3
|
||||||
|
DEFAULT_MSG
|
||||||
|
SQLite3_LIBRARY
|
||||||
|
SQLite3_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(SQLite3_FOUND)
|
||||||
|
set(SQLite3_LIBRARIES "${SQLite3_LIBRARY}")
|
||||||
|
set(SQLite3_INCLUDE_DIRS "${SQLite3_INCLUDE_DIR}")
|
||||||
|
set(SQLite3_DEFINITIONS ${PC_SQLite3_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET SQLite3::SQLite3)
|
||||||
|
add_library(SQLite3::SQLite3 UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(SQLite3::SQLite3
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${SQLite3_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_SQLite3_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
63
cmake-modules/FindSndFile.cmake
Normal file
63
cmake-modules/FindSndFile.cmake
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# 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:
|
||||||
|
FindSndFile
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Finds the SndFile library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``SndFile::SndFile``
|
||||||
|
The SndFile library
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``SndFile_FOUND``
|
||||||
|
True if the system has the SndFile library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(SndFile QUIET sndfile)
|
||||||
|
else()
|
||||||
|
find_path(SndFile_INCLUDEDIR
|
||||||
|
NAMES sndfile.h
|
||||||
|
PATH_SUFFIXES sndfile
|
||||||
|
DOC "SndFile include directory")
|
||||||
|
|
||||||
|
find_library(SndFile_LINK_LIBRARIES
|
||||||
|
NAMES sndfile sndfile-1
|
||||||
|
DOC "SndFile library"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
SndFile
|
||||||
|
DEFAULT_MSG
|
||||||
|
SndFile_LINK_LIBRARIES
|
||||||
|
SndFile_INCLUDEDIR
|
||||||
|
)
|
||||||
|
|
||||||
|
file(STRINGS "${SndFile_INCLUDEDIR}/sndfile.h" SndFile_SUPPORTS_SET_COMPRESSION_LEVEL REGEX ".*SFC_SET_COMPRESSION_LEVEL.*")
|
||||||
|
if(SndFile_SUPPORTS_SET_COMPRESSION_LEVEL)
|
||||||
|
set(SndFile_SUPPORTS_SET_COMPRESSION_LEVEL ON)
|
||||||
|
else()
|
||||||
|
set(SndFile_SUPPORTS_SET_COMPRESSION_LEVEL OFF)
|
||||||
|
endif()
|
||||||
|
mark_as_advanced(SndFile_SUPPORTS_SET_COMPRESSION_LEVEL)
|
||||||
|
|
||||||
|
if(SndFile_FOUND)
|
||||||
|
if(NOT TARGET SndFile::sndfile)
|
||||||
|
add_library(SndFile::sndfile INTERFACE IMPORTED)
|
||||||
|
target_link_libraries(SndFile::sndfile INTERFACE "${SndFile_LINK_LIBRARIES}")
|
||||||
|
target_include_directories(SndFile::sndfile INTERFACE "${SndFile_INCLUDEDIR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
85
cmake-modules/FindSoundTouch.cmake
Normal file
85
cmake-modules/FindSoundTouch.cmake
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# 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:
|
||||||
|
FindSoundTouch
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Finds the SoundTouch library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``SoundTouch::SoundTouch``
|
||||||
|
The SoundTouch library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``SoundTouch_FOUND``
|
||||||
|
True if the system has the SoundTouch library.
|
||||||
|
``SoundTouch_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use SoundTouch.
|
||||||
|
``SoundTouch_LIBRARIES``
|
||||||
|
Libraries needed to link to SoundTouch.
|
||||||
|
``SoundTouch_DEFINITIONS``
|
||||||
|
Compile definitions needed to use SoundTouch.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``SoundTouch_INCLUDE_DIR``
|
||||||
|
The directory containing ``soundtouch/SoundTouch.h``.
|
||||||
|
``SoundTouch_LIBRARY``
|
||||||
|
The path to the SoundTouch library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_SoundTouch QUIET soundtouch)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(SoundTouch_INCLUDE_DIR
|
||||||
|
NAMES soundtouch/SoundTouch.h
|
||||||
|
PATHS ${PC_SoundTouch_INCLUDE_DIRS}
|
||||||
|
DOC "SoundTouch include directory")
|
||||||
|
mark_as_advanced(SoundTouch_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(SoundTouch_LIBRARY
|
||||||
|
NAMES SoundTouch
|
||||||
|
PATHS ${PC_SoundTouch_LIBRARY_DIRS}
|
||||||
|
DOC "SoundTouch library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(SoundTouch_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
SoundTouch
|
||||||
|
DEFAULT_MSG
|
||||||
|
SoundTouch_LIBRARY
|
||||||
|
SoundTouch_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(SoundTouch_FOUND)
|
||||||
|
set(SoundTouch_LIBRARIES "${SoundTouch_LIBRARY}")
|
||||||
|
set(SoundTouch_INCLUDE_DIRS "${SoundTouch_INCLUDE_DIR}")
|
||||||
|
set(SoundTouch_DEFINITIONS ${PC_SoundTouch_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET SoundTouch::SoundTouch)
|
||||||
|
add_library(SoundTouch::SoundTouch UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(SoundTouch::SoundTouch
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${SoundTouch_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_SoundTouch_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${SoundTouch_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
81
cmake-modules/FindSoxr.cmake
Normal file
81
cmake-modules/FindSoxr.cmake
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindSoxr
|
||||||
|
--------
|
||||||
|
|
||||||
|
Finds the Soxr library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``Soxr::Soxr``
|
||||||
|
The Soxr library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``Soxr_FOUND``
|
||||||
|
True if the system has the Soxr library.
|
||||||
|
``Soxr_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use Soxr.
|
||||||
|
``Soxr_LIBRARIES``
|
||||||
|
Libraries needed to link to Soxr.
|
||||||
|
``Soxr_DEFINITIONS``
|
||||||
|
Compile definitions needed to use Soxr.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``Soxr_INCLUDE_DIR``
|
||||||
|
The directory containing ``soxr.h``.
|
||||||
|
``Soxr_LIBRARY``
|
||||||
|
The path to the Soxr library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_Soxr QUIET soxr)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(Soxr_INCLUDE_DIR
|
||||||
|
NAMES soxr.h
|
||||||
|
PATHS ${PC_Soxr_INCLUDE_DIRS}
|
||||||
|
DOC "Soxr include directory")
|
||||||
|
mark_as_advanced(Soxr_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(Soxr_LIBRARY
|
||||||
|
NAMES soxr
|
||||||
|
PATHS ${PC_Soxr_LIBRARY_DIRS}
|
||||||
|
DOC "Soxr library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(Soxr_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
Soxr
|
||||||
|
DEFAULT_MSG
|
||||||
|
Soxr_LIBRARY
|
||||||
|
Soxr_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(Soxr_FOUND)
|
||||||
|
set(Soxr_LIBRARIES "${Soxr_LIBRARY}")
|
||||||
|
set(Soxr_INCLUDE_DIRS "${Soxr_INCLUDE_DIR}")
|
||||||
|
set(Soxr_DEFINITIONS ${PC_Soxr_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET Soxr::soxr)
|
||||||
|
add_library(Soxr::soxr UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(Soxr::soxr
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${Soxr_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_Soxr_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${Soxr_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
81
cmake-modules/FindVampHostSDK.cmake
Normal file
81
cmake-modules/FindVampHostSDK.cmake
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindVampHostSDK
|
||||||
|
--------
|
||||||
|
|
||||||
|
Finds the VampHostSDK library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``VampHostSDK::VampHostSDK``
|
||||||
|
The VampHostSDK library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``VampHostSDK_FOUND``
|
||||||
|
True if the system has the VampHostSDK library.
|
||||||
|
``VampHostSDK_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use VampHostSDK.
|
||||||
|
``VampHostSDK_LIBRARIES``
|
||||||
|
Libraries needed to link to VampHostSDK.
|
||||||
|
``VampHostSDK_DEFINITIONS``
|
||||||
|
Compile definitions needed to use VampHostSDK.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``VampHostSDK_INCLUDE_DIR``
|
||||||
|
The directory containing ``vamp-hostsdk/vamp-hostsdk.h``.
|
||||||
|
``VampHostSDK_LIBRARY``
|
||||||
|
The path to the VampHostSDK library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_VampHostSDK QUIET vamp-hostsdk)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(VampHostSDK_INCLUDE_DIR
|
||||||
|
NAMES vamp-hostsdk/vamp-hostsdk.h
|
||||||
|
PATHS ${PC_VampHostSDK_INCLUDE_DIRS}
|
||||||
|
DOC "VampHostSDK include directory")
|
||||||
|
mark_as_advanced(VampHostSDK_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(VampHostSDK_LIBRARY
|
||||||
|
NAMES vamp-hostsdk
|
||||||
|
PATHS ${PC_VampHostSDK_LIBRARY_DIRS}
|
||||||
|
DOC "VampHostSDK library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(VampHostSDK_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
VampHostSDK
|
||||||
|
DEFAULT_MSG
|
||||||
|
VampHostSDK_LIBRARY
|
||||||
|
VampHostSDK_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(VampHostSDK_FOUND)
|
||||||
|
set(VampHostSDK_LIBRARIES "${VampHostSDK_LIBRARY}")
|
||||||
|
set(VampHostSDK_INCLUDE_DIRS "${VampHostSDK_INCLUDE_DIR}")
|
||||||
|
set(VampHostSDK_DEFINITIONS ${PC_VampHostSDK_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET VampHostSDK::VampHostSDK)
|
||||||
|
add_library(VampHostSDK::VampHostSDK UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(VampHostSDK::VampHostSDK
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${VampHostSDK_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_VampHostSDK_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${VampHostSDK_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
102
cmake-modules/FindVorbis.cmake
Normal file
102
cmake-modules/FindVorbis.cmake
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
# 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:
|
||||||
|
FindVorbis
|
||||||
|
----------
|
||||||
|
|
||||||
|
Finds the Vorbis library.
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``Vorbis_FOUND``
|
||||||
|
True if the system has the OggVorbis library.
|
||||||
|
``Vorbis_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use OggVorbis.
|
||||||
|
``Vorbis_LIBRARIES``
|
||||||
|
Libraries needed to link to OggVorbis.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``Vorbis_vorbis_INCLUDE_DIR``
|
||||||
|
The directory containing ``vorbis/vorbis.h``.
|
||||||
|
``Vorbis_vorbisenc_INCLUDE_DIR``
|
||||||
|
The directory containing ``vorbis/vorbisenc.h``.
|
||||||
|
``Vorbis_vorbisfile_INCLUDE_DIR``
|
||||||
|
The directory containing ``vorbis/vorbisfile.h``.
|
||||||
|
``Vorbis_vorbis_LIBRARY``
|
||||||
|
The path to the vorbis library.
|
||||||
|
``Vorbis_vorbisenc_LIBRARY``
|
||||||
|
The path to the vorbisenc library.
|
||||||
|
``Vorbis_vorbisfile_LIBRARY``
|
||||||
|
The path to the vorbisfile library.
|
||||||
|
``Vorbis_LIBRARIES``
|
||||||
|
Libraries needed to link to vorbis.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_path(Vorbis_vorbis_INCLUDE_DIR
|
||||||
|
NAMES vorbis/codec.h
|
||||||
|
DOC "Vorbis include directory"
|
||||||
|
)
|
||||||
|
mark_as_advanced(Vorbis_vorbis_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_path(Vorbis_vorbisenc_INCLUDE_DIR
|
||||||
|
NAMES vorbis/vorbisenc.h
|
||||||
|
DOC "Vorbisenc include directory"
|
||||||
|
)
|
||||||
|
mark_as_advanced(Vorbis_vorbisenc_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_path(Vorbis_vorbisfile_INCLUDE_DIR
|
||||||
|
NAMES vorbis/vorbisfile.h
|
||||||
|
DOC "Vorbisfile include directory"
|
||||||
|
)
|
||||||
|
mark_as_advanced(Vorbis_vorbisfile_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(Vorbis_vorbis_LIBRARY
|
||||||
|
NAMES vorbis
|
||||||
|
DOC "Vorbis library")
|
||||||
|
mark_as_advanced(Vorbis_vorbis_LIBRARY)
|
||||||
|
|
||||||
|
find_library(Vorbis_vorbisenc_LIBRARY
|
||||||
|
NAMES vorbisenc
|
||||||
|
DOC "Vorbisenc library")
|
||||||
|
mark_as_advanced(Vorbis_vorbisenc_LIBRARY)
|
||||||
|
|
||||||
|
find_library(Vorbis_vorbisfile_LIBRARY
|
||||||
|
NAMES vorbisfile
|
||||||
|
DOC "Vorbisfile library")
|
||||||
|
mark_as_advanced(Vorbis_vorbisfile_LIBRARY)
|
||||||
|
|
||||||
|
if(NOT Vorbis_FIND_COMPONENTS)
|
||||||
|
set(Vorbis_FIND_COMPONENTS "vorbis;vorbisenc;vorbisfile")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
foreach(component ${Vorbis_FIND_COMPONENTS})
|
||||||
|
if(Vorbis_${component}_INCLUDE_DIR AND Vorbis_${component}_LIBRARY)
|
||||||
|
set(Vorbis_${component}_FOUND TRUE)
|
||||||
|
if(NOT TARGET Vorbis::${component})
|
||||||
|
add_library(Vorbis::${component} UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(Vorbis::${component}
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${Vorbis_${component}_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_${component}_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(Vorbis_${component}_FOUND FALSE)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Vorbis
|
||||||
|
REQUIRED_VARS Vorbis_vorbis_INCLUDE_DIR Vorbis_vorbis_LIBRARY
|
||||||
|
HANDLE_COMPONENTS
|
||||||
|
)
|
||||||
76
cmake-modules/Findid3tag.cmake
Normal file
76
cmake-modules/Findid3tag.cmake
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
# 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:
|
||||||
|
Findid3tag
|
||||||
|
----------
|
||||||
|
|
||||||
|
Finds the id3tag library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``id3tag::id3tag``
|
||||||
|
The id3tag library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``id3tag_FOUND``
|
||||||
|
True if the system has the id3tag library.
|
||||||
|
``id3tag_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use id3tag.
|
||||||
|
``id3tag_LIBRARIES``
|
||||||
|
Libraries needed to link to id3tag.
|
||||||
|
``id3tag_DEFINITIONS``
|
||||||
|
Compile definitions needed to use id3tag.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``id3tag_INCLUDE_DIR``
|
||||||
|
The directory containing ``id3tag.h``.
|
||||||
|
``id3tag_LIBRARY``
|
||||||
|
The path to the id3tag library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(id3tag id3tag)
|
||||||
|
else()
|
||||||
|
find_path(id3tag_INCLUDEDIR
|
||||||
|
NAMES id3tag.h
|
||||||
|
DOC "id3tag include directory")
|
||||||
|
|
||||||
|
find_library(id3tag_LINK_LIBRARIES
|
||||||
|
NAMES id3tag
|
||||||
|
DOC "id3tag library"
|
||||||
|
)
|
||||||
|
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
list(APPEND id3tag_LINK_LIBRARIES ZLIB::ZLIB)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
id3tag
|
||||||
|
DEFAULT_MSG
|
||||||
|
id3tag_LINK_LIBRARIES
|
||||||
|
id3tag_INCLUDEDIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(id3tag_FOUND)
|
||||||
|
if(NOT TARGET id3tag::id3tag)
|
||||||
|
add_library(id3tag::id3tag INTERFACE IMPORTED)
|
||||||
|
target_link_libraries(id3tag::id3tag INTERFACE "${id3tag_LINK_LIBRARIES}")
|
||||||
|
target_include_directories(id3tag::id3tag INTERFACE "${id3tag_INCLUDEDIR}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
81
cmake-modules/Findlibtwolame.cmake
Normal file
81
cmake-modules/Findlibtwolame.cmake
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#[=======================================================================[.rst:
|
||||||
|
Findlibtwolame
|
||||||
|
--------
|
||||||
|
|
||||||
|
Finds the libtwolame library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``libtwolame::libtwolame``
|
||||||
|
The libtwolame library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``libtwolame_FOUND``
|
||||||
|
True if the system has the libtwolame library.
|
||||||
|
``libtwolame_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use libtwolame.
|
||||||
|
``libtwolame_LIBRARIES``
|
||||||
|
Libraries needed to link to libtwolame.
|
||||||
|
``libtwolame_DEFINITIONS``
|
||||||
|
Compile definitions needed to use libtwolame.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``libtwolame_INCLUDE_DIR``
|
||||||
|
The directory containing ``twolame.h``.
|
||||||
|
``libtwolame_LIBRARY``
|
||||||
|
The path to the libtwolame library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_libtwolame QUIET twolame)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(libtwolame_INCLUDE_DIR
|
||||||
|
NAMES twolame.h
|
||||||
|
PATHS ${PC_libtwolame_INCLUDE_DIRS}
|
||||||
|
DOC "libtwolame include directory")
|
||||||
|
mark_as_advanced(libtwolame_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(libtwolame_LIBRARY
|
||||||
|
NAMES twolame
|
||||||
|
PATHS ${PC_libtwolame_LIBRARY_DIRS}
|
||||||
|
DOC "libtwolame library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(libtwolame_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
libtwolame
|
||||||
|
DEFAULT_MSG
|
||||||
|
libtwolame_LIBRARY
|
||||||
|
libtwolame_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(libtwolame_FOUND)
|
||||||
|
set(libtwolame_LIBRARIES "${libtwolame_LIBRARY}")
|
||||||
|
set(libtwolame_INCLUDE_DIRS "${libtwolame_INCLUDE_DIR}")
|
||||||
|
set(libtwolame_DEFINITIONS ${PC_libtwolame_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET libtwolame::libtwolame)
|
||||||
|
add_library(libtwolame::libtwolame UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(libtwolame::libtwolame
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${libtwolame_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_libtwolame_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${libtwolame_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
97
cmake-modules/Findlilv.cmake
Normal file
97
cmake-modules/Findlilv.cmake
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
# 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 file for details.
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
Findlilv
|
||||||
|
--------
|
||||||
|
|
||||||
|
Finds the lilv library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``lilv::lilv``
|
||||||
|
The lilv library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``lilv_FOUND``
|
||||||
|
True if the system has the lilv library.
|
||||||
|
``lilv_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use lilv.
|
||||||
|
``lilv_LIBRARIES``
|
||||||
|
Libraries needed to link to lilv.
|
||||||
|
``lilv_DEFINITIONS``
|
||||||
|
Compile definitions needed to use lilv.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``lilv_INCLUDE_DIR``
|
||||||
|
The directory containing ``lilv-0/lilb/lilv.h``.
|
||||||
|
``lilv_LIBRARY``
|
||||||
|
The path to the lilv library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_lilv QUIET lilv-0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(lilv_INCLUDE_DIR
|
||||||
|
NAMES lilv/lilv.h
|
||||||
|
PATH_SUFFIXES lilv-0
|
||||||
|
PATHS ${PC_lilv_INCLUDE_DIRS}
|
||||||
|
DOC "lilv include directory"
|
||||||
|
)
|
||||||
|
mark_as_advanced(lilv_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(lilv_LIBRARY
|
||||||
|
NAMES lilv-0 lilv
|
||||||
|
PATHS ${PC_lilv_LIBRARY_DIRS}
|
||||||
|
DOC "lilv library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(lilv_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
lilv
|
||||||
|
DEFAULT_MSG
|
||||||
|
lilv_LIBRARY
|
||||||
|
lilv_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(lilv_FOUND)
|
||||||
|
set(lilv_LIBRARIES "${lilv_LIBRARY}")
|
||||||
|
set(lilv_INCLUDE_DIRS "${lilv_INCLUDE_DIR}")
|
||||||
|
set(lilv_DEFINITIONS ${PC_lilv_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET lilv::lilv)
|
||||||
|
add_library(lilv::lilv UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(lilv::lilv
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${lilv_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_lilv_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${lilv_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
get_target_property(LILV_TYPE lilv::lilv TYPE)
|
||||||
|
if(LILV_TYPE STREQUAL "STATIC_LIBRARY")
|
||||||
|
find_package(lv2 CONFIG REQUIRED)
|
||||||
|
find_package(serd CONFIG REQUIRED)
|
||||||
|
find_package(sord CONFIG REQUIRED)
|
||||||
|
find_package(sratom CONFIG REQUIRED)
|
||||||
|
set_property(TARGET lilv::lilv APPEND PROPERTY INTERFACE_LINK_LIBRARIES
|
||||||
|
lv2::lv2 serd::serd sord::sord sratom::sratom
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
74
cmake-modules/Findmp3lame.cmake
Normal file
74
cmake-modules/Findmp3lame.cmake
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
# 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:
|
||||||
|
Findmp3lame
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Finds the LAME library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``mp3lame::mp3lame``
|
||||||
|
The LAME library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``mp3lame_FOUND``
|
||||||
|
True if the system has the LAME library.
|
||||||
|
``mp3lame_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use LAME.
|
||||||
|
``mp3lame_LIBRARIES``
|
||||||
|
Libraries needed to link to LAME.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``mp3lame_INCLUDE_DIR``
|
||||||
|
The directory containing ``lame/lame.h``.
|
||||||
|
``mp3lame_LIBRARY``
|
||||||
|
The path to the LAME library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_path(mp3lame_INCLUDE_DIR
|
||||||
|
NAMES lame/lame.h
|
||||||
|
DOC "LAME include directory")
|
||||||
|
mark_as_advanced(mp3lame_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(mp3lame_LIBRARY
|
||||||
|
NAMES mp3lame mp3lame-static libmp3lame
|
||||||
|
DOC "LAME library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(mp3lame_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
mp3lame
|
||||||
|
DEFAULT_MSG
|
||||||
|
mp3lame_LIBRARY
|
||||||
|
mp3lame_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(mp3lame_FOUND)
|
||||||
|
set(mp3lame_LIBRARIES "${mp3lame_LIBRARY}")
|
||||||
|
set(mp3lame_INCLUDE_DIRS "${mp3lame_INCLUDE_DIR}")
|
||||||
|
|
||||||
|
if(NOT TARGET mp3lame::mp3lame)
|
||||||
|
add_library(mp3lame::mp3lame UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(mp3lame::mp3lame
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${mp3lame_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${mp3lame_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
77
cmake-modules/Findsbsms.cmake
Normal file
77
cmake-modules/Findsbsms.cmake
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#[=======================================================================[.rst:
|
||||||
|
Findsbsms
|
||||||
|
--------
|
||||||
|
|
||||||
|
Finds the sbsms library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``sbsms::sbsms``
|
||||||
|
The sbsms library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``sbsms_FOUND``
|
||||||
|
True if the system has the sbsms library.
|
||||||
|
``sbsms_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use sbsms.
|
||||||
|
``sbsms_LIBRARIES``
|
||||||
|
Libraries needed to link to sbsms.
|
||||||
|
``sbsms_DEFINITIONS``
|
||||||
|
Compile definitions needed to use sbsms.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``sbsms_INCLUDE_DIR``
|
||||||
|
The directory containing ``sbsms.h``.
|
||||||
|
``sbsms_LIBRARY``
|
||||||
|
The path to the sbsms library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_sbsms QUIET flac)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(sbsms_INCLUDE_DIR
|
||||||
|
NAMES sbsms.h
|
||||||
|
PATHS ${PC_sbsms_INCLUDE_DIRS}
|
||||||
|
DOC "sbsms include directory")
|
||||||
|
mark_as_advanced(sbsms_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(sbsms_LIBRARY
|
||||||
|
NAMES sbsms
|
||||||
|
PATHS ${PC_sbsms_LIBRARY_DIRS}
|
||||||
|
DOC "sbsms library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(sbsms_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
sbsms
|
||||||
|
DEFAULT_MSG
|
||||||
|
sbsms_LIBRARY
|
||||||
|
sbsms_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(sbsms_FOUND)
|
||||||
|
if(NOT TARGET sbsms::sbsms)
|
||||||
|
add_library(sbsms::sbsms UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(sbsms::sbsms
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${sbsms_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_sbsms_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${sbsms_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
85
cmake-modules/Findsuil.cmake
Normal file
85
cmake-modules/Findsuil.cmake
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# 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:
|
||||||
|
Findsuil
|
||||||
|
--------
|
||||||
|
|
||||||
|
Finds the suil library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following imported targets, if found:
|
||||||
|
|
||||||
|
``suil::suil``
|
||||||
|
The suil library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This will define the following variables:
|
||||||
|
|
||||||
|
``suil_FOUND``
|
||||||
|
True if the system has the suil library.
|
||||||
|
``suil_INCLUDE_DIRS``
|
||||||
|
Include directories needed to use suil.
|
||||||
|
``suil_LIBRARIES``
|
||||||
|
Libraries needed to link to suil.
|
||||||
|
``suil_DEFINITIONS``
|
||||||
|
Compile definitions needed to use suil.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following cache variables may also be set:
|
||||||
|
|
||||||
|
``suil_INCLUDE_DIR``
|
||||||
|
The directory containing ``suil/all.h``.
|
||||||
|
``suil_LIBRARY``
|
||||||
|
The path to the suil library.
|
||||||
|
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_suil QUIET suil-0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(suil_INCLUDE_DIR
|
||||||
|
NAMES suil/suil.h
|
||||||
|
PATHS ${PC_suil_INCLUDE_DIRS}
|
||||||
|
DOC "suil include directory")
|
||||||
|
mark_as_advanced(suil_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(suil_LIBRARY
|
||||||
|
NAMES suil-0
|
||||||
|
PATHS ${PC_suil_LIBRARY_DIRS}
|
||||||
|
DOC "suil library"
|
||||||
|
)
|
||||||
|
mark_as_advanced(suil_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
suil
|
||||||
|
DEFAULT_MSG
|
||||||
|
suil_LIBRARY
|
||||||
|
suil_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(suil_FOUND)
|
||||||
|
set(suil_LIBRARIES "${suil_LIBRARY}")
|
||||||
|
set(suil_INCLUDE_DIRS "${suil_INCLUDE_DIR}")
|
||||||
|
set(suil_DEFINITIONS ${PC_suil_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
if(NOT TARGET suil::suil)
|
||||||
|
add_library(suil::suil UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(suil::suil
|
||||||
|
PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${suil_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_suil_CFLAGS_OTHER}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${suil_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
@@ -1,22 +1,5 @@
|
|||||||
// -*- mode: c++ -*-
|
#ifdef PORTSMF_CAPITAL
|
||||||
// Indirectly include Allegro header so that we can disable warnings about unused parameters
|
#include <portSMF/allegro.h>
|
||||||
// when compiling Audacity itself.
|
#else
|
||||||
|
#include <portsmf/allegro.h>
|
||||||
#ifdef _MSC_VER
|
#endif
|
||||||
// If this is compiled with MSVC (Visual Studio)
|
|
||||||
|
|
||||||
#pragma warning( push )
|
|
||||||
#pragma warning( disable : 4100)
|
|
||||||
#include "../portsmf/allegro.h"
|
|
||||||
#pragma warning( pop )
|
|
||||||
|
|
||||||
#elif defined(__linux__)
|
|
||||||
|
|
||||||
#include <cstring> // Allegro include fails if this header isn't included due to no memcpy
|
|
||||||
#include "../portsmf/allegro.h"
|
|
||||||
|
|
||||||
#else //_MSC_VER
|
|
||||||
|
|
||||||
#include "../portsmf/allegro.h"
|
|
||||||
|
|
||||||
#endif //_MSC_VER
|
|
||||||
|
|||||||
292
lib-src/libnyquist/CMakeLists.txt
Normal file
292
lib-src/libnyquist/CMakeLists.txt
Normal file
@@ -0,0 +1,292 @@
|
|||||||
|
project(Nyquist)
|
||||||
|
|
||||||
|
add_library(libnyquist
|
||||||
|
# libnyquist
|
||||||
|
|
||||||
|
nyx.c
|
||||||
|
|
||||||
|
# libnyquist/nyquist/cmt
|
||||||
|
|
||||||
|
nyquist/cmt/cext.c
|
||||||
|
nyquist/cmt/cleanup.c
|
||||||
|
nyquist/cmt/cmdline.c
|
||||||
|
nyquist/cmt/cmtcmd.c
|
||||||
|
nyquist/cmt/mem.c
|
||||||
|
nyquist/cmt/midifile.c
|
||||||
|
nyquist/cmt/midifns.c
|
||||||
|
nyquist/cmt/moxc.c
|
||||||
|
nyquist/cmt/record.c
|
||||||
|
nyquist/cmt/seq.c
|
||||||
|
nyquist/cmt/seqmread.c
|
||||||
|
nyquist/cmt/seqmwrite.c
|
||||||
|
nyquist/cmt/seqread.c
|
||||||
|
nyquist/cmt/seqwrite.c
|
||||||
|
nyquist/cmt/tempomap.c
|
||||||
|
nyquist/cmt/timebase.c
|
||||||
|
nyquist/cmt/userio.c
|
||||||
|
|
||||||
|
# libnyquist/nyquist/cmupv
|
||||||
|
|
||||||
|
nyquist/cmupv/src/cmupv.c
|
||||||
|
nyquist/cmupv/src/cmupvdbg.c
|
||||||
|
nyquist/cmupv/src/internal.c
|
||||||
|
|
||||||
|
# libnyquist/nyquist/ffts
|
||||||
|
|
||||||
|
nyquist/ffts/src/fftext.c
|
||||||
|
nyquist/ffts/src/fftlib.c
|
||||||
|
nyquist/ffts/src/matlib.c
|
||||||
|
|
||||||
|
# libnyquist/nyquist/nyqsrc
|
||||||
|
|
||||||
|
nyquist/nyqsrc/add.c
|
||||||
|
nyquist/nyqsrc/avg.c
|
||||||
|
nyquist/nyqsrc/compose.c
|
||||||
|
nyquist/nyqsrc/convolve.c
|
||||||
|
nyquist/nyqsrc/debug.c
|
||||||
|
nyquist/nyqsrc/downsample.c
|
||||||
|
nyquist/nyqsrc/f0.cpp
|
||||||
|
nyquist/nyqsrc/falloc.c
|
||||||
|
nyquist/nyqsrc/ffilterkit.c
|
||||||
|
nyquist/nyqsrc/fft.c
|
||||||
|
nyquist/nyqsrc/handlers.c
|
||||||
|
nyquist/nyqsrc/inverse.c
|
||||||
|
nyquist/nyqsrc/local.c
|
||||||
|
nyquist/nyqsrc/lpanal.c
|
||||||
|
nyquist/nyqsrc/multiread.c
|
||||||
|
nyquist/nyqsrc/multiseq.c
|
||||||
|
nyquist/nyqsrc/phasevocoder.c
|
||||||
|
nyquist/nyqsrc/probe.c
|
||||||
|
nyquist/nyqsrc/pvshell.c
|
||||||
|
nyquist/nyqsrc/resamp.c
|
||||||
|
nyquist/nyqsrc/resampv.c
|
||||||
|
nyquist/nyqsrc/samples.c
|
||||||
|
nyquist/nyqsrc/seqext.c
|
||||||
|
nyquist/nyqsrc/seqfnint.c
|
||||||
|
nyquist/nyqsrc/seqinterf.c
|
||||||
|
nyquist/nyqsrc/sliderdata.c
|
||||||
|
nyquist/nyqsrc/sndfnint.c
|
||||||
|
nyquist/nyqsrc/sndmax.c
|
||||||
|
nyquist/nyqsrc/sndread.c
|
||||||
|
nyquist/nyqsrc/sndseq.c
|
||||||
|
nyquist/nyqsrc/sndsliders.c
|
||||||
|
nyquist/nyqsrc/sndwritepa.c
|
||||||
|
nyquist/nyqsrc/sound.c
|
||||||
|
nyquist/nyqsrc/stats.c
|
||||||
|
nyquist/nyqsrc/stoponzero.c
|
||||||
|
nyquist/nyqsrc/trigger.c
|
||||||
|
nyquist/nyqsrc/yin.c
|
||||||
|
|
||||||
|
# libnyquist/nyquist/nyqstk
|
||||||
|
|
||||||
|
nyquist/nyqstk/instr.cpp
|
||||||
|
nyquist/nyqstk/stkinit.cpp
|
||||||
|
nyquist/nyqstk/stkint.cpp
|
||||||
|
nyquist/nyqstk/src/ADSR.cpp
|
||||||
|
nyquist/nyqstk/src/BandedWG.cpp
|
||||||
|
nyquist/nyqstk/src/BiQuad.cpp
|
||||||
|
nyquist/nyqstk/src/Bowed.cpp
|
||||||
|
nyquist/nyqstk/src/BowTable.cpp
|
||||||
|
nyquist/nyqstk/src/Chorus.cpp
|
||||||
|
nyquist/nyqstk/src/Clarinet.cpp
|
||||||
|
nyquist/nyqstk/src/Delay.cpp
|
||||||
|
nyquist/nyqstk/src/DelayA.cpp
|
||||||
|
nyquist/nyqstk/src/DelayL.cpp
|
||||||
|
nyquist/nyqstk/src/Effect.cpp
|
||||||
|
nyquist/nyqstk/src/Envelope.cpp
|
||||||
|
nyquist/nyqstk/src/FileRead.cpp
|
||||||
|
nyquist/nyqstk/src/FileWvIn.cpp
|
||||||
|
nyquist/nyqstk/src/Filter.cpp
|
||||||
|
nyquist/nyqstk/src/Flute.cpp
|
||||||
|
nyquist/nyqstk/src/Function.cpp
|
||||||
|
nyquist/nyqstk/src/Generator.cpp
|
||||||
|
nyquist/nyqstk/src/Instrmnt.cpp
|
||||||
|
nyquist/nyqstk/src/JCRev.cpp
|
||||||
|
nyquist/nyqstk/src/JetTable.cpp
|
||||||
|
nyquist/nyqstk/src/Mandolin.cpp
|
||||||
|
nyquist/nyqstk/src/Modal.cpp
|
||||||
|
nyquist/nyqstk/src/ModalBar.cpp
|
||||||
|
nyquist/nyqstk/src/Noise.cpp
|
||||||
|
nyquist/nyqstk/src/NRev.cpp
|
||||||
|
nyquist/nyqstk/src/OnePole.cpp
|
||||||
|
nyquist/nyqstk/src/OneZero.cpp
|
||||||
|
nyquist/nyqstk/src/PitShift.cpp
|
||||||
|
nyquist/nyqstk/src/PluckTwo.cpp
|
||||||
|
nyquist/nyqstk/src/PoleZero.cpp
|
||||||
|
nyquist/nyqstk/src/PRCRev.cpp
|
||||||
|
nyquist/nyqstk/src/ReedTable.cpp
|
||||||
|
nyquist/nyqstk/src/Saxofony.cpp
|
||||||
|
nyquist/nyqstk/src/SineWave.cpp
|
||||||
|
nyquist/nyqstk/src/Sitar.cpp
|
||||||
|
nyquist/nyqstk/src/Stk.cpp
|
||||||
|
nyquist/nyqstk/src/WaveLoop.cpp
|
||||||
|
nyquist/nyqstk/src/WvIn.cpp
|
||||||
|
|
||||||
|
|
||||||
|
# libnyquist/nyquist/sys
|
||||||
|
|
||||||
|
#nyquist/sys/mac/macaboutbox.c
|
||||||
|
#nyquist/sys/mac/MacAE.c
|
||||||
|
#nyquist/sys/mac/MacCommandWin.c
|
||||||
|
#nyquist/sys/mac/macdrag.c
|
||||||
|
#nyquist/sys/mac/MacFileUtils.c
|
||||||
|
#nyquist/sys/mac/macfun.c
|
||||||
|
#nyquist/sys/mac/MacHandleEv.c
|
||||||
|
#nyquist/sys/mac/macint.c
|
||||||
|
#nyquist/sys/mac/macstuff.c
|
||||||
|
#nyquist/sys/mac/xlextstart.c
|
||||||
|
#nyquist/sys/unix/io.c
|
||||||
|
#nyquist/sys/unix/osstuff.c
|
||||||
|
#nyquist/sys/unix/term.c
|
||||||
|
#nyquist/sys/unix/termtest.c
|
||||||
|
#nyquist/sys/win/msvc/winfun.c
|
||||||
|
#nyquist/sys/win/msvc/winstuff.c
|
||||||
|
#nyquist/sys/win/wingui/winguistuff.c
|
||||||
|
#nyquist/sys/win/wingui/xlextstart.c
|
||||||
|
#nyquist/sys/win/wingui/xlispfns.c
|
||||||
|
|
||||||
|
# libnyquist/nyquist/tran
|
||||||
|
|
||||||
|
nyquist/tran/abs.c
|
||||||
|
nyquist/tran/allpoles.c
|
||||||
|
nyquist/tran/alpass.c
|
||||||
|
nyquist/tran/alpasscv.c
|
||||||
|
nyquist/tran/alpassvc.c
|
||||||
|
nyquist/tran/alpassvv.c
|
||||||
|
nyquist/tran/amosc.c
|
||||||
|
nyquist/tran/areson.c
|
||||||
|
nyquist/tran/aresoncv.c
|
||||||
|
nyquist/tran/aresonvc.c
|
||||||
|
nyquist/tran/aresonvv.c
|
||||||
|
nyquist/tran/atone.c
|
||||||
|
nyquist/tran/atonev.c
|
||||||
|
nyquist/tran/biquadfilt.c
|
||||||
|
nyquist/tran/buzz.c
|
||||||
|
nyquist/tran/chase.c
|
||||||
|
nyquist/tran/clip.c
|
||||||
|
nyquist/tran/congen.c
|
||||||
|
nyquist/tran/const.c
|
||||||
|
nyquist/tran/coterm.c
|
||||||
|
nyquist/tran/delaycc.c
|
||||||
|
nyquist/tran/delaycv.c
|
||||||
|
nyquist/tran/eqbandvvv.c
|
||||||
|
nyquist/tran/exp.c
|
||||||
|
nyquist/tran/fmfb.c
|
||||||
|
nyquist/tran/fmfbv.c
|
||||||
|
nyquist/tran/fmosc.c
|
||||||
|
nyquist/tran/follow.c
|
||||||
|
nyquist/tran/fromarraystream.c
|
||||||
|
nyquist/tran/fromobject.c
|
||||||
|
nyquist/tran/gate.c
|
||||||
|
nyquist/tran/ifft.c
|
||||||
|
nyquist/tran/instrbanded.c
|
||||||
|
nyquist/tran/instrbow.c
|
||||||
|
nyquist/tran/instrbowedfreq.c
|
||||||
|
nyquist/tran/instrclar.c
|
||||||
|
nyquist/tran/instrclarall.c
|
||||||
|
nyquist/tran/instrclarfreq.c
|
||||||
|
nyquist/tran/instrflute.c
|
||||||
|
nyquist/tran/instrfluteall.c
|
||||||
|
nyquist/tran/instrflutefreq.c
|
||||||
|
nyquist/tran/instrmandolin.c
|
||||||
|
nyquist/tran/instrmodalbar.c
|
||||||
|
nyquist/tran/instrsax.c
|
||||||
|
nyquist/tran/instrsaxall.c
|
||||||
|
nyquist/tran/instrsaxfreq.c
|
||||||
|
nyquist/tran/instrsitar.c
|
||||||
|
nyquist/tran/integrate.c
|
||||||
|
nyquist/tran/log.c
|
||||||
|
nyquist/tran/lpreson.c
|
||||||
|
nyquist/tran/maxv.c
|
||||||
|
nyquist/tran/offset.c
|
||||||
|
nyquist/tran/oneshot.c
|
||||||
|
nyquist/tran/osc.c
|
||||||
|
nyquist/tran/partial.c
|
||||||
|
nyquist/tran/pluck.c
|
||||||
|
nyquist/tran/prod.c
|
||||||
|
nyquist/tran/pwl.c
|
||||||
|
nyquist/tran/quantize.c
|
||||||
|
nyquist/tran/recip.c
|
||||||
|
nyquist/tran/reson.c
|
||||||
|
nyquist/tran/resoncv.c
|
||||||
|
nyquist/tran/resonvc.c
|
||||||
|
nyquist/tran/resonvv.c
|
||||||
|
nyquist/tran/sampler.c
|
||||||
|
nyquist/tran/scale.c
|
||||||
|
nyquist/tran/shape.c
|
||||||
|
nyquist/tran/sine.c
|
||||||
|
nyquist/tran/siosc.c
|
||||||
|
nyquist/tran/slope.c
|
||||||
|
nyquist/tran/sqrt.c
|
||||||
|
nyquist/tran/stkchorus.c
|
||||||
|
nyquist/tran/stkpitshift.c
|
||||||
|
nyquist/tran/stkrev.c
|
||||||
|
nyquist/tran/tapf.c
|
||||||
|
nyquist/tran/tapv.c
|
||||||
|
nyquist/tran/tone.c
|
||||||
|
nyquist/tran/tonev.c
|
||||||
|
nyquist/tran/upsample.c
|
||||||
|
nyquist/tran/white.c
|
||||||
|
|
||||||
|
# libnyquist/nyquist/xlisp
|
||||||
|
|
||||||
|
nyquist/xlisp/extern.c
|
||||||
|
nyquist/xlisp/path.c
|
||||||
|
nyquist/xlisp/security.c
|
||||||
|
nyquist/xlisp/xlbfun.c
|
||||||
|
nyquist/xlisp/xlcont.c
|
||||||
|
nyquist/xlisp/xldbug.c
|
||||||
|
nyquist/xlisp/xldmem.c
|
||||||
|
nyquist/xlisp/xleval.c
|
||||||
|
nyquist/xlisp/xlfio.c
|
||||||
|
nyquist/xlisp/xlftab.c
|
||||||
|
nyquist/xlisp/xlglob.c
|
||||||
|
nyquist/xlisp/xlimage.c
|
||||||
|
nyquist/xlisp/xlinit.c
|
||||||
|
nyquist/xlisp/xlio.c
|
||||||
|
nyquist/xlisp/xlisp.c
|
||||||
|
nyquist/xlisp/xljump.c
|
||||||
|
nyquist/xlisp/xllist.c
|
||||||
|
nyquist/xlisp/xlmath.c
|
||||||
|
nyquist/xlisp/xlobj.c
|
||||||
|
nyquist/xlisp/xlpp.c
|
||||||
|
nyquist/xlisp/xlprin.c
|
||||||
|
nyquist/xlisp/xlread.c
|
||||||
|
nyquist/xlisp/xlstr.c
|
||||||
|
nyquist/xlisp/xlsubr.c
|
||||||
|
nyquist/xlisp/xlsym.c
|
||||||
|
nyquist/xlisp/xlsys.c
|
||||||
|
)
|
||||||
|
|
||||||
|
find_package(PortAudio REQUIRED)
|
||||||
|
find_package(SndFile REQUIRED)
|
||||||
|
find_package(wxWidgets REQUIRED)
|
||||||
|
target_link_libraries(libnyquist PRIVATE PortAudio::PortAudio SndFile::sndfile ${wxWidgets_LIBRARIES})
|
||||||
|
|
||||||
|
target_include_directories(libnyquist
|
||||||
|
PRIVATE
|
||||||
|
nyquist/cmt
|
||||||
|
nyquist/cmupv/src
|
||||||
|
nyquist/ffts/src
|
||||||
|
nyquist/nyqsrc
|
||||||
|
nyquist/nyqstk
|
||||||
|
nyquist/nyqstk/include
|
||||||
|
nyquist/tran
|
||||||
|
nyquist/xlisp
|
||||||
|
$<$<BOOL:${UNIX}>:${CMAKE_CURRENT_SOURCE_DIR}/nyquist/sys/unix>
|
||||||
|
$<$<BOOL:${WIN32}>:${CMAKE_CURRENT_SOURCE_DIR}/nyquist/sys/win/msvc>
|
||||||
|
PUBLIC
|
||||||
|
.
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(libnyquist
|
||||||
|
PRIVATE
|
||||||
|
CMTSTUFF
|
||||||
|
EXT
|
||||||
|
$<$<PLATFORM_ID:Windows>:WIN32>
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_options(libnyquist
|
||||||
|
PRIVATE
|
||||||
|
$<$<PLATFORM_ID:Darwin>:-fno-common>
|
||||||
|
)
|
||||||
@@ -5,7 +5,7 @@ def_vars()
|
|||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
HexHelpers.h
|
HexHelpers.h
|
||||||
|
|
||||||
UrlEncode.h
|
UrlEncode.h
|
||||||
UrlEncode.cpp
|
UrlEncode.cpp
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ set(SOURCES
|
|||||||
|
|
||||||
set( LIBRARIES
|
set( LIBRARIES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
wxwidgets::base
|
wxWidgets::wxWidgets
|
||||||
)
|
)
|
||||||
|
|
||||||
audacity_library( ${TARGET} "${SOURCES}" "${LIBRARIES}" "" "" )
|
audacity_library( ${TARGET} "${SOURCES}" "${LIBRARIES}" "" "" )
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ set( SOURCES
|
|||||||
)
|
)
|
||||||
set( LIBRARIES
|
set( LIBRARIES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
wxBase
|
wxWidgets::wxWidgets
|
||||||
)
|
)
|
||||||
audacity_library( lib-strings "${SOURCES}" "${LIBRARIES}"
|
audacity_library( lib-strings "${SOURCES}" "${LIBRARIES}"
|
||||||
"" ""
|
"" ""
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if( GIT_FOUND )
|
|||||||
${CMAKE_COMMAND} -D GIT="${GIT_EXECUTABLE}"
|
${CMAKE_COMMAND} -D GIT="${GIT_EXECUTABLE}"
|
||||||
-D GIT_DESCRIBE="${GIT_DESCRIBE}"
|
-D GIT_DESCRIBE="${GIT_DESCRIBE}"
|
||||||
-D "_PRVDIR=${_PRVDIR}"
|
-D "_PRVDIR=${_PRVDIR}"
|
||||||
-P "${AUDACITY_MODULE_PATH}/Version.cmake"
|
-P "cmake-proxies/cmake-modules/Version.cmake"
|
||||||
WORKING_DIRECTORY
|
WORKING_DIRECTORY
|
||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
@@ -1028,7 +1028,6 @@ list( APPEND RESOURCES
|
|||||||
list( APPEND DEFINES
|
list( APPEND DEFINES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
BUILDING_AUDACITY
|
BUILDING_AUDACITY
|
||||||
WXUSINGDLL
|
|
||||||
CMAKE
|
CMAKE
|
||||||
$<$<BOOL:${HAVE_LRINT}>:
|
$<$<BOOL:${HAVE_LRINT}>:
|
||||||
HAVE_LRINT
|
HAVE_LRINT
|
||||||
@@ -1072,32 +1071,34 @@ list( APPEND LIBRARIES
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_REQUIRED_LIBRARIES}
|
${CMAKE_REQUIRED_LIBRARIES}
|
||||||
ZLIB::ZLIB
|
ZLIB::ZLIB
|
||||||
wxwidgets::wxwidgets
|
wxWidgets::wxWidgets
|
||||||
expat::expat
|
EXPAT::EXPAT
|
||||||
libmp3lame::libmp3lame
|
mp3lame::mp3lame
|
||||||
libsndfile
|
SndFile::sndfile
|
||||||
libsoxr
|
Soxr::soxr
|
||||||
portaudio-v19
|
PortAudio::PortAudio
|
||||||
sqlite
|
${SQLite3_LIBRARIES}
|
||||||
$<$<BOOL:${USE_FFMPEG}>:ffmpeg>
|
$<$<BOOL:${USE_FFMPEG}>:FFMPEG::FFMPEG>
|
||||||
$<$<BOOL:${USE_LIBID3TAG}>:libid3tag::libid3tag>
|
$<$<BOOL:${USE_LIBID3TAG}>:id3tag::id3tag>
|
||||||
$<$<BOOL:${USE_LIBFLAC}>:libflac>
|
$<$<BOOL:${USE_LIBFLAC}>:FLAC++::FLAC++>
|
||||||
$<$<BOOL:${USE_LIBMAD}>:libmad::libmad>
|
$<$<BOOL:${USE_LIBMAD}>:MAD::MAD>
|
||||||
$<$<BOOL:${USE_LIBOGG}>:libogg>
|
$<$<BOOL:${USE_LIBOGG}>:Ogg::ogg>
|
||||||
$<$<BOOL:${USE_LIBVORBIS}>:libvorbis>
|
$<$<BOOL:${USE_LIBVORBIS}>:Vorbis::vorbis>
|
||||||
$<$<BOOL:${USE_LIBTWOLAME}>:twolame>
|
$<$<BOOL:${USE_LIBVORBIS}>:Vorbis::vorbisenc>
|
||||||
$<$<BOOL:${USE_LV2}>:lv2>
|
$<$<BOOL:${USE_LIBVORBIS}>:Vorbis::vorbisfile>
|
||||||
$<$<BOOL:${USE_MIDI}>:portmidi>
|
$<$<BOOL:${USE_LIBTWOLAME}>:libtwolame::libtwolame>
|
||||||
$<$<BOOL:${USE_MIDI}>:portsmf>
|
$<$<BOOL:${USE_LV2}>:lilv::lilv>
|
||||||
$<$<BOOL:${USE_NYQUIST}>:libnyquist>
|
$<$<BOOL:${USE_LV2}>:suil::suil>
|
||||||
|
$<$<BOOL:${USE_MIDI}>:PortMidi::PortMidi>
|
||||||
|
$<$<BOOL:${USE_MIDI}>:PortSMF::PortSMF>
|
||||||
|
libnyquist
|
||||||
$<$<BOOL:${USE_PORTMIXER}>:portmixer>
|
$<$<BOOL:${USE_PORTMIXER}>:portmixer>
|
||||||
$<$<BOOL:${USE_SBSMS}>:libsbsms>
|
$<$<BOOL:${USE_SBSMS}>:sbsms::sbsms>
|
||||||
$<$<BOOL:${USE_SOUNDTOUCH}>:soundtouch>
|
$<$<BOOL:${USE_SOUNDTOUCH}>:SoundTouch::SoundTouch>
|
||||||
$<$<BOOL:${USE_VAMP}>:libvamp>
|
$<$<BOOL:${USE_VAMP}>:VampHostSDK::VampHostSDK>
|
||||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD,NetBSD,CYGWIN>:PkgConfig::GLIB>
|
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD,NetBSD,CYGWIN>:${GLIB_LIBRARIES}>
|
||||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD,NetBSD,CYGWIN>:PkgConfig::GTK>
|
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD,NetBSD,CYGWIN>:GTK::GTK>
|
||||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD,NetBSD,CYGWIN>:z>
|
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD,NetBSD,CYGWIN>:Threads::Threads>
|
||||||
$<$<PLATFORM_ID:Linux,FreeBSD,OpenBSD,NetBSD,CYGWIN>:pthread>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set( BUILDING_AUDACITY YES )
|
set( BUILDING_AUDACITY YES )
|
||||||
@@ -1110,11 +1111,11 @@ set( HAVE_GTK ${GTK_FOUND} )
|
|||||||
# can be done against ExportMP3.cpp. If either are defined, the
|
# can be done against ExportMP3.cpp. If either are defined, the
|
||||||
# build will fail.
|
# build will fail.
|
||||||
if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin" )
|
if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin" )
|
||||||
if( "${${_OPT}use_lame}" STREQUAL "local" )
|
if( LAME_FOUND )
|
||||||
set( DISABLE_DYNAMIC_LOADING_LAME YES )
|
set( DISABLE_DYNAMIC_LOADING_LAME YES )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( "${${_OPT}use_ffmpeg}" STREQUAL "linked" )
|
if( FFMPEG_FOUND )
|
||||||
set( DISABLE_DYNAMIC_LOADING_FFMPEG YES )
|
set( DISABLE_DYNAMIC_LOADING_FFMPEG YES )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -1210,17 +1211,22 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|||||||
menus/WindowMenus.cpp
|
menus/WindowMenus.cpp
|
||||||
widgets/FileDialog/mac/FileDialogPrivate.mm
|
widgets/FileDialog/mac/FileDialogPrivate.mm
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
COMPILE_FLAGS "-x objective-c++"
|
COMPILE_FLAGS "-ObjC++"
|
||||||
SKIP_PRECOMPILE_HEADERS YES
|
SKIP_PRECOMPILE_HEADERS YES
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add our required frameworks
|
|
||||||
list( APPEND LIBRARIES
|
list( APPEND LIBRARIES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"-framework AudioUnit"
|
"-framework Foundation"
|
||||||
"-framework CoreAudio"
|
"-framework Cocoa"
|
||||||
"-framework CoreAudioKit"
|
"-framework Carbon"
|
||||||
)
|
)
|
||||||
|
if(USE_AUDIO_UNITS)
|
||||||
|
list(APPEND LIBRARIES
|
||||||
|
PRIVATE
|
||||||
|
"-framework AudioUnit"
|
||||||
|
"-framework CoreAudioKit")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Use the Aqua theme
|
# Use the Aqua theme
|
||||||
set( USE_AQUA_THEME 1 )
|
set( USE_AQUA_THEME 1 )
|
||||||
@@ -1340,6 +1346,8 @@ target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
|
|||||||
target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
|
target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
|
||||||
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
||||||
target_link_options( ${TARGET} PRIVATE ${LDFLAGS} )
|
target_link_options( ${TARGET} PRIVATE ${LDFLAGS} )
|
||||||
|
# Somehow the "version" target gets added to the LIBRARIES list? But only on Windows??
|
||||||
|
list(REMOVE_ITEM LIBRARIES version)
|
||||||
target_link_libraries( ${TARGET} ${LIBRARIES} )
|
target_link_libraries( ${TARGET} ${LIBRARIES} )
|
||||||
target_link_libraries( ${TARGET} PUBLIC ${AUDACITY_LIBRARIES} )
|
target_link_libraries( ${TARGET} PUBLIC ${AUDACITY_LIBRARIES} )
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,20 @@ void ScriptCommandRelay::StartScriptServer(tpRegScriptServerFunc scriptFn)
|
|||||||
std::thread(server, scriptFn).detach();
|
std::thread(server, scriptFn).detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Why is this mixing private libnyquist symbols with wxString???????
|
||||||
|
#include "../../lib-src/libnyquist/nyquist/xlisp/xlisp.h"
|
||||||
|
void * nyq_reformat_aud_do_response(const wxString & Str) {
|
||||||
|
LVAL dst;
|
||||||
|
LVAL message;
|
||||||
|
LVAL success;
|
||||||
|
wxString Left = Str.BeforeLast('\n').BeforeLast('\n').ToAscii();
|
||||||
|
wxString Right = Str.BeforeLast('\n').AfterLast('\n').ToAscii();
|
||||||
|
message = cvstring(Left);
|
||||||
|
success = Right.EndsWith("OK") ? s_true : nullptr;
|
||||||
|
dst = cons(message, success);
|
||||||
|
return (void *)dst;
|
||||||
|
}
|
||||||
|
|
||||||
void * ExecForLisp( char * pIn )
|
void * ExecForLisp( char * pIn )
|
||||||
{
|
{
|
||||||
wxString Str1(pIn);
|
wxString Str1(pIn);
|
||||||
|
|||||||
@@ -34,6 +34,5 @@ public:
|
|||||||
// The void * return is actually a Lisp LVAL and will be cast to such as needed.
|
// The void * return is actually a Lisp LVAL and will be cast to such as needed.
|
||||||
extern void * ExecForLisp( char * pIn );
|
extern void * ExecForLisp( char * pIn );
|
||||||
extern void * nyq_make_opaque_string( int size, unsigned char *src );
|
extern void * nyq_make_opaque_string( int size, unsigned char *src );
|
||||||
extern void * nyq_reformat_aud_do_response(const wxString & Str);
|
|
||||||
|
|
||||||
#endif /* End of include guard: __SCRIPT_COMMAND_RELAY__ */
|
#endif /* End of include guard: __SCRIPT_COMMAND_RELAY__ */
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ the pitch without changing the tempo.
|
|||||||
#undef PACKAGE_BUGREPORT
|
#undef PACKAGE_BUGREPORT
|
||||||
#undef PACKAGE
|
#undef PACKAGE
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
#include "SoundTouch.h"
|
#include "soundtouch/SoundTouch.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ID_PercentChange = 10000,
|
ID_PercentChange = 10000,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#undef PACKAGE_BUGREPORT
|
#undef PACKAGE_BUGREPORT
|
||||||
#undef PACKAGE
|
#undef PACKAGE
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
#include "SoundTouch.h"
|
#include "soundtouch/SoundTouch.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ effect that uses SoundTouch to do its processing (ChangeTempo
|
|||||||
#undef PACKAGE_BUGREPORT
|
#undef PACKAGE_BUGREPORT
|
||||||
#undef PACKAGE
|
#undef PACKAGE
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
#include "SoundTouch.h"
|
#include "soundtouch/SoundTouch.h"
|
||||||
|
|
||||||
#ifdef USE_MIDI
|
#ifdef USE_MIDI
|
||||||
EffectSoundTouch::EffectSoundTouch()
|
EffectSoundTouch::EffectSoundTouch()
|
||||||
|
|||||||
@@ -3437,18 +3437,6 @@ void * nyq_make_opaque_string( int size, unsigned char *src ){
|
|||||||
return (void*)dst;
|
return (void*)dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
void * nyq_reformat_aud_do_response(const wxString & Str) {
|
|
||||||
LVAL dst;
|
|
||||||
LVAL message;
|
|
||||||
LVAL success;
|
|
||||||
wxString Left = Str.BeforeLast('\n').BeforeLast('\n').ToAscii();
|
|
||||||
wxString Right = Str.BeforeLast('\n').AfterLast('\n').ToAscii();
|
|
||||||
message = cvstring(Left);
|
|
||||||
success = Right.EndsWith("OK") ? s_true : nullptr;
|
|
||||||
dst = cons(message, success);
|
|
||||||
return (void *)dst;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "../../commands/ScriptCommandRelay.h"
|
#include "../../commands/ScriptCommandRelay.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user