- fix Linux build

This commit is contained in:
Dmytro Bogovych 2023-06-25 14:56:45 +03:00
parent 22653e6241
commit 8dd494157f
1 changed files with 6 additions and 4 deletions

View File

@ -45,26 +45,28 @@ set (SOURCES
)
add_library(media_lib ${SOURCES})
set (LIBS_CODEC)
if (USE_AMR_CODEC)
include (../../../../libraries/platform_libs.cmake)
message("Media: AMR NB and WB codecs will be included.")
target_compile_definitions(media_lib PUBLIC USE_AMR_CODEC)
set (LIBS_CODEC)
list (APPEND LIBS_CODEC ${OPENCORE_AMRNB} ${OPENCORE_AMRWB})
endif()
if (USE_EVS_CODEC)
message("Media: EVS codec will be included.")
target_compile_definitions (media_lib PUBLIC USE_EVS_CODEC)
set (LIBS_CODEC evs_codec)
list (APPEND LIBS_CODEC evs_codec)
endif()
if (USE_OPUS_CODEC)
message("Media: Opus codec will be included.")
target_compile_definitions(media_lib PUBLIC USE_OPUS_CODEC)
set (LIBS_CODEC opus)
list (APPEND LIBS_CODEC opus)
add_subdirectory(../../libs/opus build_opus)
endif()
if(CMAKE_SYSTEM MATCHES "Linux*" OR CMAKE_SYSTEM MATCHES "Darwin*")
target_compile_definitions(media_lib PUBLIC HAVE_NETINET_IN_H)
endif()