From fb783cfd6499e0e76de06a5a290988bbd771c1c0 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Sun, 3 Dec 2017 19:36:07 +0200 Subject: [PATCH] Use OpenAL-provided cmake config, update readme --- CMakeLists.txt | 4 ++-- README.md | 8 +++++--- Telegram/CMakeLists.txt | 8 ++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1fed3edc..6245dbdc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,8 +23,8 @@ if (CMAKE_VERSION VERSION_GREATER 3.9) endif() # Needs OpenAL-SOFT -# Install via `brew install openal-soft` and configure with `env OPENALDIR=/usr/local/opt/openal-soft` -find_package(OpenAL REQUIRED) +# Install via `brew install openal-soft` and configure with cmake call from README.md +find_package(OpenAL REQUIRED NO_MODULE) find_package(ZLIB REQUIRED) find_package(OpenSSL REQUIRED) find_package(FFmpeg REQUIRED) diff --git a/README.md b/README.md index 309331345..e7a42c758 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,13 @@ This is the complete source code and the build instructions for the alpha versio ## Build instructions +Must have OpenAL-soft and Qt5 installed. Provide paths to them in CMAKE_PREFIX_PATH variable when configuring. + ccache -o sloppiness=pch_defines,time_macros - mkdir _build_ - cd _build_ + mkdir _conan_build_ + cd _conan_build_ conan install .. --build missing - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5/ .. + cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="/usr/local/opt/qt5/;/usr/local/opt/openal-soft" .. ninja [![Version](https://badge.fury.io/gh/telegramdesktop%2Ftdesktop.svg)](https://github.com/telegramdesktop/tdesktop/releases) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 1b1379cf5..4888aaf37 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -547,7 +547,7 @@ include_directories(ThirdParty/GSL/include ThirdParty/variant/include include_directories(SourceFiles SourceFiles/core) -include_directories(${OPENAL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} +include_directories(${ZLIB_INCLUDE_DIRS} ${LIBZIP_INCLUDE_DIR_ZIP} ${LIBZIP_INCLUDE_DIR_ZIPCONF} ${OPENSSL_INCLUDE_DIR} ${LIBLZMA_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR} ${OPUS_INCLUDE_DIR} @@ -555,10 +555,6 @@ include_directories(${OPENAL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} add_subdirectory(ThirdParty/libtgvoip) -# Shut up for testbuilding, remove me -include_directories(/usr/local/opt/openal-soft/include) -# End remove me - if(NOT WIN32) add_definitions(-Wno-switch) endif() @@ -620,7 +616,7 @@ target_link_libraries(Telegram Qt5::Network Qt5::GuiPrivate tgvoip - ${OPENAL_LIBRARY} + OpenAL::OpenAL ${FFMPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${SWRESAMPLE_LIBRARIES}