mirror of https://github.com/procxx/kepka.git
Switch to FindOpus.cmake
This commit is contained in:
parent
53996d1983
commit
d2c6b4041a
|
@ -29,9 +29,7 @@ find_package(ZLIB REQUIRED)
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
find_package(FFmpeg REQUIRED)
|
find_package(FFmpeg REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
#@todo Turn into find_package(Opus REQUIRED)
|
find_package(Opus REQUIRED)
|
||||||
find_library(OPUS_LIB opus)
|
|
||||||
find_path(OPUS_INCLUDE_DIR opus/opus.h)
|
|
||||||
|
|
||||||
if (NOT SWSCALE_FOUND)
|
if (NOT SWSCALE_FOUND)
|
||||||
message(FATAL_ERROR "FFmpeg swscale is required")
|
message(FATAL_ERROR "FFmpeg swscale is required")
|
||||||
|
@ -39,8 +37,5 @@ endif()
|
||||||
if (NOT SWRESAMPLE_FOUND)
|
if (NOT SWRESAMPLE_FOUND)
|
||||||
message(FATAL_ERROR "FFmpeg swresample is required")
|
message(FATAL_ERROR "FFmpeg swresample is required")
|
||||||
endif()
|
endif()
|
||||||
if (NOT OPUS_LIB)
|
|
||||||
message(FATAL_ERROR "opus codec is required")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(Telegram)
|
add_subdirectory(Telegram)
|
||||||
|
|
|
@ -627,7 +627,7 @@ target_link_libraries(Telegram
|
||||||
${SWRESAMPLE_LIBRARIES}
|
${SWRESAMPLE_LIBRARIES}
|
||||||
${SWSCALE_LIBRARIES}
|
${SWSCALE_LIBRARIES}
|
||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
${OPUS_LIB}
|
${OPUS_LIBRARIES}
|
||||||
${CONAN_LIBS}
|
${CONAN_LIBS}
|
||||||
) # crashpad::crashpad_client)
|
) # crashpad::crashpad_client)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# - Try to find Opus
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# OPUS_FOUND - system has opus
|
||||||
|
# OPUS_INCLUDE_DIR - the opus include directory
|
||||||
|
# OPUS_LIBRARIES - Link these to use opus
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_library(OPUS_LIBRARIES opus)
|
||||||
|
find_path(OPUS_INCLUDE_DIR opus/opus.h)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(Opus DEFAULT_MSG OPUS_INCLUDE_DIR OPUS_LIBRARIES)
|
Loading…
Reference in New Issue