cmake_minimum_required(VERSION 3.9) project(telegram-desktop) if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() else() find_package(OpenSSL REQUIRED) endif() set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cotire/CMake;${PROJECT_SOURCE_DIR}/modules/") include(cotire) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED YES) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) if (CMAKE_VERSION VERSION_GREATER 3.9) cmake_policy(SET CMP0071 NEW) endif() # Needs OpenAL-SOFT # Install via `brew install openal-soft` and configure with `env OPENALDIR=/usr/local/opt/openal-soft` find_package(OpenAL REQUIRED) find_package(ZLIB REQUIRED) find_package(OpenSSL REQUIRED) find_package(FFmpeg REQUIRED) find_package(ZLIB REQUIRED) find_package(Opus REQUIRED) if (NOT SWSCALE_FOUND) message(FATAL_ERROR "FFmpeg swscale is required") endif() if (NOT SWRESAMPLE_FOUND) message(FATAL_ERROR "FFmpeg swresample is required") endif() add_subdirectory(Telegram)