diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b3f4fd4d..df9aa67b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,9 +27,15 @@ set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Needs OpenAL-SOFT -# Install via `brew install openal-soft` and configure with cmake call from README.md -find_package(OpenAL REQUIRED NO_MODULE) +if (LINUX) + find_package(OpenAL REQUIRED) +else(LINUX) + # Needs OpenAL-SOFT + # Install via `brew install openal-soft` and configure with cmake call from README.md + find_package(OpenAL REQUIRED NO_MODULE) + set(OPENAL_LIBRARY OpenAL::OpenAL) +endif(LINUX) + find_package(ZLIB REQUIRED) find_package(FFmpeg REQUIRED) find_package(Opus REQUIRED) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 776344647..cabd6bbe4 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -639,7 +639,7 @@ target_link_libraries(Telegram Qt5::Network Qt5::GuiPrivate tgvoip - OpenAL::OpenAL + ${OPENAL_LIBRARY} ${FFMPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${SWRESAMPLE_LIBRARIES}