diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindFFMPEG.cmake | 166 | ||||
-rw-r--r-- | cmake/modules/FindFFmpeg.cmake | 186 | ||||
-rw-r--r-- | cmake/modules/FindHIDAPI.cmake | 2 | ||||
-rw-r--r-- | cmake/modules/FindLilv.cmake | 87 | ||||
-rw-r--r-- | cmake/modules/FindRubberband.cmake | 86 | ||||
-rw-r--r-- | cmake/modules/FindSndFile.cmake | 6 | ||||
-rw-r--r-- | cmake/modules/FindWavPack.cmake | 86 | ||||
-rw-r--r-- | cmake/modules/Findlilv.cmake | 88 | ||||
-rw-r--r-- | cmake/modules/Findmp3lame.cmake (renamed from cmake/modules/FindLAME.cmake) | 46 | ||||
-rw-r--r-- | cmake/modules/Findrubberband.cmake | 86 | ||||
-rw-r--r-- | cmake/modules/Findwavpack.cmake | 86 |
11 files changed, 453 insertions, 472 deletions
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake new file mode 100644 index 0000000000..cd1ebe34c8 --- /dev/null +++ b/cmake/modules/FindFFMPEG.cmake @@ -0,0 +1,166 @@ +#.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 +# +# 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} 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() + + +# 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}) + 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) + +# 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}) diff --git a/cmake/modules/FindFFmpeg.cmake b/cmake/modules/FindFFmpeg.cmake deleted file mode 100644 index 2126aed73e..0000000000 --- a/cmake/modules/FindFFmpeg.cmake +++ /dev/null @@ -1,186 +0,0 @@ -#.rst: -# FindFFmpeg -# ---------- -# -# Try to find the required ffmpeg components (default: AVFORMAT, AVUTIL, AVCODEC) -# -# 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. -# -# :: -# -# AVCODEC -# AVDEVICE -# AVFORMAT -# AVFILTER -# AVUTIL -# POSTPROC -# SWSCALE -# -# 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 AVCODEC AVFORMAT AVUTIL) -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_${_component} QUIET ${_pkgconfig}) - endif () - - find_path(${_component}_INCLUDE_DIRS ${_header} - HINTS - ${PC_${_component}_INCLUDEDIR} - ${PC_${_component}_INCLUDE_DIRS} - ${PC_FFMPEG_INCLUDE_DIRS} - PATH_SUFFIXES - ffmpeg - ) - - find_library(${_component}_LIBRARIES NAMES ${PC_${_component}_LIBRARIES} ${_library} - HINTS - ${PC_${_component}_LIBDIR} - ${PC_${_component}_LIBRARY_DIRS} - ${PC_FFMPEG_LIBRARY_DIRS} - ) - - #message(STATUS ${${_component}_LIBRARIES}) - #message(STATUS ${PC_${_component}_LIBRARIES}) - - set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.") - set(${_component}_VERSION ${PC_${_component}_VERSION} CACHE STRING "The ${_component} version number.") - - if (${_component}_LIBRARIES AND ${_component}_INCLUDE_DIRS) - # message(STATUS " - ${_component} found.") - set(${_component}_FOUND TRUE) - else () - # message(STATUS " - ${_component} not found.") - endif () - - mark_as_advanced( - ${_component}_INCLUDE_DIRS - ${_component}_LIBRARIES - ${_component}_DEFINITIONS - ${_component}_VERSION) - -endmacro() - - -# Check for all possible component. -find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h) -find_component(AVFORMAT libavformat avformat libavformat/avformat.h) -find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h) -find_component(AVUTIL libavutil avutil libavutil/avutil.h) -find_component(AVFILTER libavfilter avfilter libavfilter/avfilter.h) -find_component(SWSCALE libswscale swscale libswscale/swscale.h) -find_component(POSTPROC libpostproc postproc libpostproc/postprocess.h) -find_component(SWRESAMPLE 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 (${_component}_FOUND) - # message(STATUS "Required component ${_component} present.") - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES}) - set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS}) - list(APPEND FFMPEG_INCLUDE_DIRS ${${_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() - - else () - # message(STATUS "Required component ${_component} missing.") - 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 ${_component}_LIBRARIES ${_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}) diff --git a/cmake/modules/FindHIDAPI.cmake b/cmake/modules/FindHIDAPI.cmake index 7f2f2fa6ed..699fd31670 100644 --- a/cmake/modules/FindHIDAPI.cmake +++ b/cmake/modules/FindHIDAPI.cmake @@ -56,7 +56,7 @@ find_path(HIDAPI_INCLUDE_DIR mark_as_advanced(HIDAPI_INCLUDE_DIR) find_library(HIDAPI_LIBRARY - NAMES hidapi-libusb + NAMES hidapi-libusb hidapi PATHS ${PC_HIDAPI_LIBRARY_DIRS} DOC "HIDAPI library" ) diff --git a/cmake/modules/FindLilv.cmake b/cmake/modules/FindLilv.cmake deleted file mode 100644 index f89d2b0580..0000000000 --- a/cmake/modules/FindLilv.cmake +++ /dev/null @@ -1,87 +0,0 @@ -# This file is part of Mixxx, Digital DJ'ing software. -# 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-0/lilv/lilv.h - PATHS ${PC_Lilv_INCLUDE_DIRS} - DOC "Lilv include directory" -) -mark_as_advanced(Lilv_INCLUDE_DIR) - -find_library(Lilv_LIBRARY - NAMES lilv-0 - 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}" - ) - endif() -endif() diff --git a/cmake/modules/FindRubberband.cmake b/cmake/modules/FindRubberband.cmake deleted file mode 100644 index 4f4046ea62..0000000000 --- a/cmake/modules/FindRubberband.cmake +++ /dev/null @@ -1,86 +0,0 @@ -# This file is part of Mixxx, Digital DJ'ing software. -# 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: -FindRubberband --------------- - -Finds the Rubberband library. - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module provides the following imported targets, if found: - -``Rubberband::Rubberband`` - The Rubberband library - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``Rubberband_FOUND`` - True if the system has the Rubberband library. -``Rubberband_INCLUDE_DIRS`` - Include directories needed to use Rubberband. -``Rubberband_LIBRARIES`` - Libraries needed to link to Rubberband. -``Rubberband_DEFINITIONS`` - Compile definitions needed to use Rubberband. - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``Rubberband_INCLUDE_DIR`` - The directory containing ``rubberband/RubberBandStretcher.h``. -``Rubberband_LIBRARY`` - The path to the Rubberband library. - -#]=======================================================================] - -find_package(PkgConfig QUIET) -if(PkgConfig_FOUND) - pkg_check_modules(PC_Rubberband QUIET rubberband) -endif() - -find_path(Rubberband_INCLUDE_DIR - NAMES rubberband/RubberBandStretcher.h - PATHS ${PC_Rubberband_INCLUDE_DIRS} - DOC "Rubberband include directory") -mark_as_advanced(Rubberband_INCLUDE_DIR) - -find_library(Rubberband_LIBRARY - NAMES rubberband - PATHS ${PC_Rubberband_LIBRARY_DIRS} - DOC "Rubberband library" -) -mark_as_advanced(Rubberband_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - Rubberband - DEFAULT_MSG - Rubberband_LIBRARY - Rubberband_INCLUDE_DIR -) - -if(Rubberband_FOUND) - set(Rubberband_LIBRARIES "${Rubberband_LIBRARY}") - set(Rubberband_INCLUDE_DIRS "${Rubberband_INCLUDE_DIR}") - set(Rubberband_DEFINITIONS ${PC_Rubberband_CFLAGS_OTHER}) - - if(NOT TARGET Rubberband::Rubberband) - add_library(Rubberband::Rubberband UNKNOWN IMPORTED) - set_target_properties(Rubberband::Rubberband - PROPERTIES - IMPORTED_LOCATION "${Rubberband_LIBRARY}" - INTERFACE_COMPILE_OPTIONS "${PC_Rubberband_CFLAGS_OTHER}" - INTERFACE_INCLUDE_DIRECTORIES "${Rubberband_INCLUDE_DIR}" - ) - endif() -endif() diff --git a/cmake/modules/FindSndFile.cmake b/cmake/modules/FindSndFile.cmake index 42a951e141..b8ab75b8af 100644 --- a/cmake/modules/FindSndFile.cmake +++ b/cmake/modules/FindSndFile.cmake @@ -83,9 +83,9 @@ if(SndFile_FOUND) set(SndFile_INCLUDE_DIRS "${SndFile_INCLUDE_DIR}") set(SndFile_DEFINITIONS ${PC_SndFile_CFLAGS_OTHER}) - if(NOT TARGET SndFile::SndFile) - add_library(SndFile::SndFile UNKNOWN IMPORTED) - set_target_properties(SndFile::SndFile + if(NOT TARGET SndFile::sndfile) + add_library(SndFile::sndfile UNKNOWN IMPORTED) + set_target_properties(SndFile::sndfile PROPERTIES IMPORTED_LOCATION "${SndFile_LIBRARY}" INTERFACE_COMPILE_OPTIONS "${PC_SndFile_CFLAGS_OTHER}" diff --git a/cmake/modules/FindWavPack.cmake b/cmake/modules/FindWavPack.cmake deleted file mode 100644 index 3890df0ba2..0000000000 --- a/cmake/modules/FindWavPack.cmake +++ /dev/null @@ -1,86 +0,0 @@ -# This file is part of Mixxx, Digital DJ'ing software. -# 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: -FindWavPack ------------ - -Finds the WavPack library. - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module provides the following imported targets, if found: - -``WavPack::WavPack`` - The WavPack library - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``WavPack_FOUND`` - True if the system has the WavPack library. -``WavPack_INCLUDE_DIRS`` - Include directories needed to use WavPack. -``WavPack_LIBRARIES`` - Libraries needed to link to WavPack. -``WavPack_DEFINITIONS`` - Compile definitions needed to use WavPack. - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``WavPack_INCLUDE_DIR`` - The directory containing ``wavpack/wavpack.h``. -``WavPack_LIBRARY`` - The path to the WavPack library. - -#]=======================================================================] - -find_package(PkgConfig QUIET) -if(PkgConfig_FOUND) - pkg_check_modules(PC_WavPack QUIET wavpack) -endif() - -find_path(WavPack_INCLUDE_DIR - NAMES wavpack/wavpack.h - PATHS ${PC_WavPack_INCLUDE_DIRS} - DOC "WavPack include directory") -mark_as_advanced(WavPack_INCLUDE_DIR) - -find_library(WavPack_LIBRARY - NAMES wavpack wv - PATHS ${PC_WavPack_LIBRARY_DIRS} - DOC "WavPack library" -) -mark_as_advanced(WavPack_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - WavPack - DEFAULT_MSG - WavPack_LIBRARY - WavPack_INCLUDE_DIR -) - -if(WavPack_FOUND) - set(WavPack_LIBRARIES "${WavPack_LIBRARY}") - set(WavPack_INCLUDE_DIRS "${WavPack_INCLUDE_DIR}") - set(WavPack_DEFINITIONS ${PC_WavPack_CFLAGS_OTHER}) - - if(NOT TARGET WavPack::WavPack) - add_library(WavPack::WavPack UNKNOWN IMPORTED) - set_target_properties(WavPack::WavPack - PROPERTIES - IMPORTED_LOCATION "${WavPack_LIBRARY}" - INTERFACE_COMPILE_OPTIONS "${PC_WavPack_CFLAGS_OTHER}" - INTERFACE_INCLUDE_DIRECTORIES "${WavPack_INCLUDE_DIR}" - ) - endif() -endif() diff --git a/cmake/modules/Findlilv.cmake b/cmake/modules/Findlilv.cmake new file mode 100644 index 0000000000..15cd4571ca --- /dev/null +++ b/cmake/modules/Findlilv.cmake @@ -0,0 +1,88 @@ +# This file is part of Mixxx, Digital DJ'ing software. +# 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}" + ) + endif() +endif() diff --git a/cmake/modules/FindLAME.cmake b/cmake/modules/Findmp3lame.cmake index 0f52fe45ab..e7afe49774 100644 --- a/cmake/modules/FindLAME.cmake +++ b/cmake/modules/Findmp3lame.cmake @@ -4,8 +4,8 @@ # later version. See the LICENSE file for details. #[=======================================================================[.rst: -FindLAME --------- +Findmp3lame +----------- Finds the LAME library. @@ -14,7 +14,7 @@ Imported Targets This module provides the following imported targets, if found: -``LAME::LAME`` +``mp3lame::mp3lame`` The LAME library Result Variables @@ -22,11 +22,11 @@ Result Variables This will define the following variables: -``LAME_FOUND`` +``mp3lame_FOUND`` True if the system has the LAME library. -``LAME_INCLUDE_DIRS`` +``mp3lame_INCLUDE_DIRS`` Include directories needed to use LAME. -``LAME_LIBRARIES`` +``mp3lame_LIBRARIES`` Libraries needed to link to LAME. Cache Variables @@ -34,42 +34,42 @@ Cache Variables The following cache variables may also be set: -``LAME_INCLUDE_DIR`` +``mp3lame_INCLUDE_DIR`` The directory containing ``lame/lame.h``. -``LAME_LIBRARY`` +``mp3lame_LIBRARY`` The path to the LAME library. #]=======================================================================] -find_path(LAME_INCLUDE_DIR +find_path(mp3lame_INCLUDE_DIR NAMES lame/lame.h DOC "LAME include directory") -mark_as_advanced(LAME_INCLUDE_DIR) +mark_as_advanced(mp3lame_INCLUDE_DIR) -find_library(LAME_LIBRARY +find_library(mp3lame_LIBRARY NAMES mp3lame mp3lame-static DOC "LAME library" ) -mark_as_advanced(LAME_LIBRARY) +mark_as_advanced(mp3lame_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args( - LAME + mp3lame DEFAULT_MSG - LAME_LIBRARY - LAME_INCLUDE_DIR + mp3lame_LIBRARY + mp3lame_INCLUDE_DIR ) -if(LAME_FOUND) - set(LAME_LIBRARIES "${LAME_LIBRARY}") - set(LAME_INCLUDE_DIRS "${LAME_INCLUDE_DIR}") +if(mp3lame_FOUND) + set(mp3lame_LIBRARIES "${mp3lame_LIBRARY}") + set(mp3lame_INCLUDE_DIRS "${mp3lame_INCLUDE_DIR}") - if(NOT TARGET LAME::LAME) - add_library(LAME::LAME UNKNOWN IMPORTED) - set_target_properties(LAME::LAME + if(NOT TARGET mp3lame::mp3lame) + add_library(mp3lame::mp3lame UNKNOWN IMPORTED) + set_target_properties(mp3lame::mp3lame PROPERTIES - IMPORTED_LOCATION "${LAME_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${LAME_INCLUDE_DIR}" + IMPORTED_LOCATION "${mp3lame_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${mp3lame_INCLUDE_DIR}" ) endif() endif() diff --git a/cmake/modules/Findrubberband.cmake b/cmake/modules/Findrubberband.cmake new file mode 100644 index 0000000000..7de7d2efd6 --- /dev/null +++ b/cmake/modules/Findrubberband.cmake @@ -0,0 +1,86 @@ +# This file is part of Mixxx, Digital DJ'ing software. +# 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: +Findrubberband +-------------- + +Finds the rubberband library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``rubberband::rubberband`` + The rubberband library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``rubberband_FOUND`` + True if the system has the rubberband library. +``rubberband_INCLUDE_DIRS`` + Include directories needed to use rubberband. +``rubberband_LIBRARIES`` + Libraries needed to link to rubberband. +``rubberband_DEFINITIONS`` + Compile definitions needed to use rubberband. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``rubberband_INCLUDE_DIR`` + The directory containing ``rubberband/RubberBandStretcher.h``. +``rubberband_LIBRARY`` + The path to the rubberband library. + +#]=======================================================================] + +find_package(PkgConfig QUIET) +if(PkgConfig_FOUND) + pkg_check_modules(PC_rubberband QUIET rubberband) +endif() + +find_path(rubberband_INCLUDE_DIR + NAMES rubberband/RubberBandStretcher.h + PATHS ${PC_rubberband_INCLUDE_DIRS} + DOC "rubberband include directory") +mark_as_advanced(rubberband_INCLUDE_DIR) + +find_library(rubberband_LIBRARY + NAMES rubberband rubberband-library rubberband-dll + PATHS ${PC_rubberband_LIBRARY_DIRS} + DOC "rubberband library" +) +mark_as_advanced(rubberband_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + rubberband + DEFAULT_MSG + rubberband_LIBRARY + rubberband_INCLUDE_DIR +) + +if(rubberband_FOUND) + set(rubberband_LIBRARIES "${rubberband_LIBRARY}") + set(rubberband_INCLUDE_DIRS "${rubberband_INCLUDE_DIR}") + set(rubberband_DEFINITIONS ${PC_rubberband_CFLAGS_OTHER}) + + if(NOT TARGET rubberband::rubberband) + add_library(rubberband::rubberband UNKNOWN IMPORTED) + set_target_properties(rubberband::rubberband + PROPERTIES + IMPORTED_LOCATION "${rubberband_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_rubberband_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${rubberband_INCLUDE_DIR}" + ) + endif() +endif() diff --git a/cmake/modules/Findwavpack.cmake b/cmake/modules/Findwavpack.cmake new file mode 100644 index 0000000000..ddab52b2b1 --- /dev/null +++ b/cmake/modules/Findwavpack.cmake @@ -0,0 +1,86 @@ +# This file is part of Mixxx, Digital DJ'ing software. +# 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: +Findwavpack +----------- + +Finds the wavpack library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``WavPack::wavpack`` + The WavPack library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``wavpack_FOUND`` + True if the system has the wavpack library. +``wavpack_INCLUDE_DIRS`` + Include directories needed to use wavpack. +``wavpack_LIBRARIES`` + Libraries needed to link to wavpack. +``wavpack_DEFINITIONS`` + Compile definitions needed to use wavpack. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``wavpack_INCLUDE_DIR`` + The directory containing ``wavpack.h``. +``wavpack_LIBRARY`` + The path to the wavpack library. + +#]=======================================================================] + +find_package(PkgConfig QUIET) +if(PkgConfig_FOUND) + pkg_check_modules(PC_wavpack QUIET wavpack) +endif() + +find_path(wavpack_INCLUDE_DIR + NAMES wavpack.h + PATH_SUFFIXES wavpack + PATHS ${PC_wavpack_INCLUDE_DIRS} + DOC "wavpack include directory") +mark_as_advanced(wavpack_INCLUDE_DIR) + +find_library(wavpack_LIBRARY NA |