From 8f1a778365e867ec8bdccd86b9e43d197e3159ec Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 16 Jan 2021 01:44:41 +0100 Subject: CMake: Rename FindLAME module to Findmp3lame --- cmake/modules/FindLAME.cmake | 75 ----------------------------------------- cmake/modules/Findmp3lame.cmake | 75 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 75 deletions(-) delete mode 100644 cmake/modules/FindLAME.cmake create mode 100644 cmake/modules/Findmp3lame.cmake (limited to 'cmake') diff --git a/cmake/modules/FindLAME.cmake b/cmake/modules/FindLAME.cmake deleted file mode 100644 index 0f52fe45ab..0000000000 --- a/cmake/modules/FindLAME.cmake +++ /dev/null @@ -1,75 +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: -FindLAME --------- - -Finds the LAME library. - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module provides the following imported targets, if found: - -``LAME::LAME`` - The LAME library - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``LAME_FOUND`` - True if the system has the LAME library. -``LAME_INCLUDE_DIRS`` - Include directories needed to use LAME. -``LAME_LIBRARIES`` - Libraries needed to link to LAME. - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``LAME_INCLUDE_DIR`` - The directory containing ``lame/lame.h``. -``LAME_LIBRARY`` - The path to the LAME library. - -#]=======================================================================] - -find_path(LAME_INCLUDE_DIR - NAMES lame/lame.h - DOC "LAME include directory") -mark_as_advanced(LAME_INCLUDE_DIR) - -find_library(LAME_LIBRARY - NAMES mp3lame mp3lame-static - DOC "LAME library" -) -mark_as_advanced(LAME_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - LAME - DEFAULT_MSG - LAME_LIBRARY - LAME_INCLUDE_DIR -) - -if(LAME_FOUND) - set(LAME_LIBRARIES "${LAME_LIBRARY}") - set(LAME_INCLUDE_DIRS "${LAME_INCLUDE_DIR}") - - if(NOT TARGET LAME::LAME) - add_library(LAME::LAME UNKNOWN IMPORTED) - set_target_properties(LAME::LAME - PROPERTIES - IMPORTED_LOCATION "${LAME_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${LAME_INCLUDE_DIR}" - ) - endif() -endif() diff --git a/cmake/modules/Findmp3lame.cmake b/cmake/modules/Findmp3lame.cmake new file mode 100644 index 0000000000..e7afe49774 --- /dev/null +++ b/cmake/modules/Findmp3lame.cmake @@ -0,0 +1,75 @@ +# 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: +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 + 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() -- cgit v1.2.3