diff --git a/CMakeLists.txt b/CMakeLists.txt index 011429dea..65d68c82d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 3.10) project(telegram-desktop) +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cotire/CMake;${PROJECT_SOURCE_DIR}/modules/") include(cotire) @@ -13,12 +16,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Ignore automoc-ing generated files (@tbd?) cmake_policy(SET CMP0071 OLD) -# 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(LibZip REQUIRED) -find_package(OpenSSL REQUIRED) find_package(LibLZMA REQUIRED) find_package(GTK3 3.0 REQUIRED gtk) find_package(FFmpeg REQUIRED) @@ -27,8 +26,8 @@ find_package(Iconv REQUIRED) find_library(OPUS_LIB opus) find_path(OPUS_INCLUDE_DIR opus.h PATHS /usr/local/include/opus) -include_directories(${GTK3_INCLUDE_DIRS}) -link_directories(${GTK3_LIBRARY_DIRS}) +# include_directories(${GTK3_INCLUDE_DIRS}) +# link_directories(${GTK3_LIBRARY_DIRS}) if (NOT FFMPEG_SWSCALE_FOUND) message(FATAL_ERROR "FFmpeg swscale is required") diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 7ab42e6a5..c2c8e5e54 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -545,19 +545,19 @@ 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} ${GTK3_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR} ${OPUS_INCLUDE_DIR}) # ${FFMPEG_INCLUDE_DIR}) -- this doesn't work, wtf? -link_directories(${GTK3_LIBRARY_DIRS}) -link_directories(${FFMPEG_LIBRARY_DIR}) +# link_directories(${GTK3_LIBRARY_DIRS}) +# link_directories(${FFMPEG_LIBRARY_DIR}) add_subdirectory(ThirdParty/libtgvoip) # Shut up for testbuilding, remove me -include_directories(/usr/local/opt/openal-soft/include) +# include_directories(/usr/local/opt/openal-soft/include) add_definitions(-Wno-switch) # End remove me if (WIN32) @@ -588,10 +588,12 @@ add_executable(Telegram WIN32 MACOSX_BUNDLE target_compile_options(Telegram PRIVATE -Wno-c++1z-extensions) target_link_libraries(Telegram Qt5::Core Qt5::Widgets Qt5::Network) # crashpad::crashpad_client) -target_link_libraries(Telegram ${LIBLZMA_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} - ${OPENAL_LIBRARY} ${FFMPEG_LIBRARIES} ${ICONV_LIBRARIES} ${OPUS_LIB}) +target_link_libraries(Telegram ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES} + ${FFMPEG_LIBRARIES} ${ICONV_LIBRARIES} ${OPUS_LIB}) target_link_libraries(Telegram tgvoip) +target_link_libraries(Telegram ${CONAN_LIBS}) + add_dependencies(Telegram boxes_styles_output) if (APPLE) diff --git a/conanfile.txt b/conanfile.txt index cfb595f0b..033220b2b 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -1,5 +1,8 @@ [requires] -openal-soft/1.17.2@hilborn/stable +#openal-soft/1.17.2@hilborn/stable +OpenSSL/1.0.2m@conan/stable +Catch/2.0.1@bincrafters/stable +gsl_microsoft/20171020@bincrafters/stable [generators] cmake