mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-13 15:17:42 +02:00
Adds Findlibmp3lame module
This commit is contained in:
parent
65886f5c2c
commit
0e98b0aaca
29
cmake-proxies/cmake-modules/Findlibmp3lame.cmake
Normal file
29
cmake-proxies/cmake-modules/Findlibmp3lame.cmake
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#[[
|
||||||
|
A module to look for libmp3lame
|
||||||
|
]]
|
||||||
|
|
||||||
|
if( NOT libmp3lame_FOUND )
|
||||||
|
find_path( libmp3lame_INCLUDE_DIR lame/lame.h )
|
||||||
|
find_library( libmp3lame_LIBRARIES NAMES mp3lame )
|
||||||
|
|
||||||
|
if( libmp3lame_INCLUDE_DIR AND libmp3lame_LIBRARIES )
|
||||||
|
set( libmp3lame_FOUND Yes )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if( libmp3lame_FOUND )
|
||||||
|
if( NOT libmp3lame_FIND_QUIETLY )
|
||||||
|
message( STATUS "Found lame: \n\tlibmp3lame_INCLUDE_DIR: ${libmp3lame_INCLUDE_DIR}\n\tlibmp3lame_LIBRARIES: ${libmp3lame_LIBRARIES}" )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if( NOT TARGET libmp3lame::libmp3lame )
|
||||||
|
add_library( libmp3lame::libmp3lame INTERFACE IMPORTED GLOBAL)
|
||||||
|
|
||||||
|
target_include_directories( libmp3lame::libmp3lame INTERFACE ${libmp3lame_INCLUDE_DIR} )
|
||||||
|
target_link_libraries( libmp3lame::libmp3lame INTERFACE ${libmp3lame_LIBRARIES} )
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if( libmp3lame_FIND_REQUIRED )
|
||||||
|
message( FATAL_ERROR "Could not find libmp3lame")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
Loading…
x
Reference in New Issue
Block a user