From 9e68adb86662862175f00b8a00c36aa9e1569cc8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 25 Nov 2019 18:39:08 +0300 Subject: [PATCH] Initial build with Xcode. --- external/CMakeLists.txt | 2 + external/auto_updates/xz/CMakeLists.txt | 20 +++++++ external/crash_reports/CMakeLists.txt | 3 +- .../crash_reports/crashpad/CMakeLists.txt | 24 ++++++++ external/iconv/CMakeLists.txt | 20 +++++++ external/openal/CMakeLists.txt | 33 ++++++----- external/openssl/CMakeLists.txt | 32 +++++++--- external/opus/CMakeLists.txt | 28 ++++++--- external/qt/CMakeLists.txt | 27 ++++++++- external/qt/package.cmake | 1 + external/sp_media_key_tap/CMakeLists.txt | 26 ++++++++ external/zlib/CMakeLists.txt | 45 ++++++++++---- init_target.cmake | 15 ++++- nice_target_sources.cmake | 16 ++--- options.cmake | 11 +--- options_mac.cmake | 59 ++++++++++++++++++- options_win.cmake | 4 +- target_link_frameworks.cmake | 41 +++++++++++++ variables.cmake | 20 +++++-- 19 files changed, 352 insertions(+), 75 deletions(-) create mode 100644 external/auto_updates/xz/CMakeLists.txt create mode 100644 external/crash_reports/crashpad/CMakeLists.txt create mode 100644 external/iconv/CMakeLists.txt create mode 100644 external/sp_media_key_tap/CMakeLists.txt create mode 100644 target_link_frameworks.cmake diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 23c6945..d198156 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -7,6 +7,7 @@ add_subdirectory(auto_updates) add_subdirectory(crash_reports) add_subdirectory(gsl) +add_subdirectory(iconv) add_subdirectory(lz4) add_subdirectory(openal) add_subdirectory(openssl) @@ -14,6 +15,7 @@ add_subdirectory(opus) add_subdirectory(qt) add_subdirectory(ranges) add_subdirectory(rlottie) +add_subdirectory(sp_media_key_tap) add_subdirectory(variant) add_subdirectory(xxhash) add_subdirectory(zlib) diff --git a/external/auto_updates/xz/CMakeLists.txt b/external/auto_updates/xz/CMakeLists.txt new file mode 100644 index 0000000..8c506c0 --- /dev/null +++ b/external/auto_updates/xz/CMakeLists.txt @@ -0,0 +1,20 @@ +# This file is part of Desktop App Toolkit, +# a set of libraries for developing nice desktop applications. +# +# For license and copyright information please follow this link: +# https://github.com/desktop-app/legal/blob/master/LEGAL + +add_library(external_xz INTERFACE IMPORTED GLOBAL) +add_library(desktop-app::external_xz ALIAS external_xz) + +if (APPLE AND NOT build_osx) + target_link_libraries(external_xz + INTERFACE + /usr/local/macos/lib/liblzma.a + ) +else() + target_link_libraries(external_xz + INTERFACE + /usr/local/lib/liblzma.a + ) +endif() diff --git a/external/crash_reports/CMakeLists.txt b/external/crash_reports/CMakeLists.txt index 8bd76a1..a741bcb 100644 --- a/external/crash_reports/CMakeLists.txt +++ b/external/crash_reports/CMakeLists.txt @@ -7,13 +7,14 @@ add_library(external_crash_reports INTERFACE IMPORTED GLOBAL) add_library(desktop-app::external_crash_reports ALIAS external_crash_reports) -if (WIN32) +if (WIN32 OR LINUX OR build_macstore) add_subdirectory(breakpad) target_link_libraries(external_crash_reports INTERFACE desktop-app::external_breakpad ) else() + add_subdirectory(crashpad) target_link_libraries(external_crash_reports INTERFACE desktop-app::external_crashpad diff --git a/external/crash_reports/crashpad/CMakeLists.txt b/external/crash_reports/crashpad/CMakeLists.txt new file mode 100644 index 0000000..93aecba --- /dev/null +++ b/external/crash_reports/crashpad/CMakeLists.txt @@ -0,0 +1,24 @@ +# This file is part of Desktop App Toolkit, +# a set of libraries for developing nice desktop applications. +# +# For license and copyright information please follow this link: +# https://github.com/desktop-app/legal/blob/master/LEGAL + +add_library(external_crashpad INTERFACE IMPORTED GLOBAL) +add_library(desktop-app::external_crashpad ALIAS external_crashpad) + +target_include_directories(external_crashpad SYSTEM +INTERFACE + ${libs_loc}/crashpad + ${libs_loc}/crashpad/third_party/mini_chromium/mini_chromium +) + +set(crashpad_lib_loc ${libs_loc}/crashpad/out/$,Debug,Release>) + +target_link_libraries(external_crashpad +INTERFACE + ${crashpad_lib_loc}/libbase.a + ${crashpad_lib_loc}/libcrashpad_client.a + ${crashpad_lib_loc}/libcrashpad_util.a + bsm +) diff --git a/external/iconv/CMakeLists.txt b/external/iconv/CMakeLists.txt new file mode 100644 index 0000000..32989f6 --- /dev/null +++ b/external/iconv/CMakeLists.txt @@ -0,0 +1,20 @@ +# This file is part of Desktop App Toolkit, +# a set of libraries for developing nice desktop applications. +# +# For license and copyright information please follow this link: +# https://github.com/desktop-app/legal/blob/master/LEGAL + +add_library(external_iconv INTERFACE IMPORTED GLOBAL) +add_library(desktop-app::external_iconv ALIAS external_iconv) + +if (build_osx) + target_link_libraries(external_iconv + INTERFACE + /usr/local/lib/libiconv.a + ) +else() + target_link_libraries(external_iconv + INTERFACE + /usr/local/macos/lib/libiconv.a + ) +endif() diff --git a/external/openal/CMakeLists.txt b/external/openal/CMakeLists.txt index 2259b41..d7f528a 100644 --- a/external/openal/CMakeLists.txt +++ b/external/openal/CMakeLists.txt @@ -7,20 +7,25 @@ add_library(external_openal INTERFACE IMPORTED GLOBAL) add_library(desktop-app::external_openal ALIAS external_openal) -target_include_directories(external_openal SYSTEM -INTERFACE - ${libs_loc}/openal-soft/include -) - -target_link_directories(external_openal -INTERFACE - ${libs_loc}/openal-soft/build/$,Debug,Release> -) - -target_link_libraries(external_openal -INTERFACE - OpenAL32 -) +if (WIN32) + target_include_directories(external_openal SYSTEM + INTERFACE + ${libs_loc}/openal-soft/include + ) + target_link_libraries(external_openal + INTERFACE + ${libs_loc}/openal-soft/build/$,Debug,Release>/OpenAL32 + ) +else() + target_include_directories(external_openal SYSTEM + INTERFACE + /usr/local/macos/include + ) + target_link_libraries(external_openal + INTERFACE + /usr/local/macos/lib/libopenal.a + ) +endif() target_compile_definitions(external_openal INTERFACE diff --git a/external/openssl/CMakeLists.txt b/external/openssl/CMakeLists.txt index f7d8725..d89a4e5 100644 --- a/external/openssl/CMakeLists.txt +++ b/external/openssl/CMakeLists.txt @@ -12,13 +12,27 @@ INTERFACE ${libs_loc}/openssl_1_1_1/include ) -target_link_directories(external_openssl -INTERFACE - ${libs_loc}/openssl_1_1_1/out32$<$:.dbg> -) +if (WIN32) + target_link_directories(external_openssl + INTERFACE + ${libs_loc}/openssl_1_1_1/out32$<$:.dbg> + ) + target_link_libraries(external_openssl + INTERFACE + libcrypto + libssl + ) +else() + if (APPLE) + target_link_directories(external_openssl + INTERFACE + ${libs_loc}/openssl_1_1_1 + ) + endif() -target_link_libraries(external_openssl -INTERFACE - libcrypto - libssl -) + target_link_libraries(external_openssl + INTERFACE + crypto + ssl + ) +endif() diff --git a/external/opus/CMakeLists.txt b/external/opus/CMakeLists.txt index 6d347a0..080d463 100644 --- a/external/opus/CMakeLists.txt +++ b/external/opus/CMakeLists.txt @@ -12,12 +12,24 @@ INTERFACE ${libs_loc}/opus/include ) -target_link_directories(external_opus -INTERFACE - ${libs_loc}/opus/win32/VS2015/Win32/$,Debug,Release> -) +if (WIN32) + target_link_directories(external_opus + INTERFACE + ${libs_loc}/opus/win32/VS2015/Win32/$,Debug,Release> + ) -target_link_libraries(external_opus -INTERFACE - opus -) + target_link_libraries(external_opus + INTERFACE + opus + ) +elseif (APPLE AND NOT build_osx) + target_link_libraries(external_opus + INTERFACE + /usr/local/macos/lib/libopus.a + ) +else() + target_link_libraries(external_opus + INTERFACE + /usr/local/lib/libopus.a + ) +endif() diff --git a/external/qt/CMakeLists.txt b/external/qt/CMakeLists.txt index 4f2cd45..f22e976 100644 --- a/external/qt/CMakeLists.txt +++ b/external/qt/CMakeLists.txt @@ -54,6 +54,7 @@ set(common_qt_libs qtlibpng ) +set(qt_libs_list "") if (WIN32) set(qt_libs ${common_qt_libs} @@ -64,11 +65,31 @@ if (WIN32) qtfreetype qtpcre2 ) - set(qt_libs_list "") - foreach(lib ${qt_libs}) + foreach (lib ${qt_libs}) list(APPEND qt_libs_list "${lib}$<$:d>") endforeach() -else() +elseif (APPLE) + if (NOT build_osx) + set(qt_libs + ${common_qt_libs} + Qt5Core + Qt5GraphicsSupport + Qt5ClipboardSupport + qgenericbearer + qtfreetype + qtpcre2 + qcocoa + ) + else() + endif() + foreach (lib ${qt_libs}) + list(APPEND qt_libs_list "${lib}$<$:_debug>") + endforeach() + target_link_libraries(external_qt + INTERFACE + desktop-app::external_zlib + cups + ) endif() target_link_directories(external_qt diff --git a/external/qt/package.cmake b/external/qt/package.cmake index 5601f65..1e9e747 100644 --- a/external/qt/package.cmake +++ b/external/qt/package.cmake @@ -9,6 +9,7 @@ set(qt_version 5.12.5) if (WIN32) set(qt_loc ${libs_loc}/Qt-${qt_version}) else() + set(qt_loc /usr/local/desktop-app/Qt-${qt_version}) endif() set(Qt5_DIR ${qt_loc}/lib/cmake/Qt5) diff --git a/external/sp_media_key_tap/CMakeLists.txt b/external/sp_media_key_tap/CMakeLists.txt new file mode 100644 index 0000000..dff4e2a --- /dev/null +++ b/external/sp_media_key_tap/CMakeLists.txt @@ -0,0 +1,26 @@ +# This file is part of Desktop App Toolkit, +# a set of libraries for developing nice desktop applications. +# +# For license and copyright information please follow this link: +# https://github.com/desktop-app/legal/blob/master/LEGAL + +if (EXISTS ${third_party_loc}/SPMediaKeyTap) + add_library(external_sp_media_key_tap OBJECT) + add_library(desktop-app::external_sp_media_key_tap ALIAS external_sp_media_key_tap) + init_target(external_sp_media_key_tap "(external)") + + set(sp_media_key_tap_loc ${third_party_loc}/SPMediaKeyTap) + + target_sources(external_sp_media_key_tap + PRIVATE + ${sp_media_key_tap_loc}/SPMediaKeyTap.m + ${sp_media_key_tap_loc}/SPMediaKeyTap.h + ${sp_media_key_tap_loc}/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m + ${sp_media_key_tap_loc}/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.h + ) + + target_include_directories(external_sp_media_key_tap SYSTEM + INTERFACE + ${sp_media_key_tap_loc} + ) +endif() diff --git a/external/zlib/CMakeLists.txt b/external/zlib/CMakeLists.txt index 0634cf8..75b7596 100644 --- a/external/zlib/CMakeLists.txt +++ b/external/zlib/CMakeLists.txt @@ -7,6 +7,31 @@ add_library(external_zlib INTERFACE IMPORTED GLOBAL) add_library(desktop-app::external_zlib ALIAS external_zlib) +if (NOT WIN32) + add_library(external_minizip STATIC) + init_target(external_minizip "(external)") + + set(minizip_loc ${third_party_loc}/minizip) + + target_sources(external_minizip + PRIVATE + ${minizip_loc}/crypt.h + ${minizip_loc}/ioapi.c + ${minizip_loc}/ioapi.h + ${minizip_loc}/zip.c + ${minizip_loc}/zip.h + ${minizip_loc}/unzip.c + ${minizip_loc}/unzip.h + ) + + target_include_directories(external_minizip SYSTEM + INTERFACE + ${minizip_loc} + ) + + target_link_libraries(external_zlib INTERFACE external_minizip) +endif() + target_include_directories(external_zlib SYSTEM INTERFACE ${libs_loc}/zlib @@ -14,18 +39,14 @@ INTERFACE ) if (WIN32) - target_compile_definitions(external_zlib + target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI) + + target_link_directories(external_zlib INTERFACE - ZLIB_WINAPI + ${libs_loc}/zlib/contrib/vstudio/vc14/x86/ZlibStat$,Debug,ReleaseWithoutAsm> ) + + target_link_libraries(external_zlib INTERFACE zlibstat) +else() + target_link_libraries(external_zlib INTERFACE /usr/local/lib/libz.a) endif() - -target_link_directories(external_zlib -INTERFACE - ${libs_loc}/zlib/contrib/vstudio/vc14/x86/ZlibStat$,Debug,ReleaseWithoutAsm> -) - -target_link_libraries(external_zlib -INTERFACE - zlibstat -) diff --git a/init_target.cmake b/init_target.cmake index 8d2723d..ce11a41 100644 --- a/init_target.cmake +++ b/init_target.cmake @@ -11,8 +11,15 @@ function(init_target_folder target_name folder_name) endfunction() function(init_target target_name) # init_target(my_target folder_name) - if (DEFINED ARGV1) - init_target_folder(${target_name} "${ARGV1}") + if (ARGC GREATER 1) + if (${ARGV1} STREQUAL cxx_std_14 OR ${ARGV1} STREQUAL cxx_std_11) + target_compile_features(${target_name} PUBLIC ${ARGV1}) + else() + target_compile_features(${target_name} PUBLIC cxx_std_17) + init_target_folder(${target_name} ${ARGV1}) + endif() + else() + target_compile_features(${target_name} PUBLIC cxx_std_17) endif() if (WIN32) set_target_properties(${target_name} PROPERTIES @@ -23,6 +30,10 @@ function(init_target target_name) # init_target(my_target folder_name) INTERPROCEDURAL_OPTIMIZATION_RELEASE True INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO True INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL True + LINK_SEARCH_START_STATIC 1 + XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_WEAK YES + XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN YES + XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES ) endfunction() diff --git a/nice_target_sources.cmake b/nice_target_sources.cmake index 6f6e196..72747ce 100644 --- a/nice_target_sources.cmake +++ b/nice_target_sources.cmake @@ -12,21 +12,21 @@ function(nice_target_sources target_name src_loc list) set(not_win_sources "") set(not_mac_sources "") set(not_linux_sources "") - foreach(file ${list}) - if (${file} STREQUAL "PRIVATE" OR ${file} STREQUAL "PUBLIC" OR ${file} STREQUAL "INTERFACE") - set(writing_now ${file}) + foreach (entry ${list}) + if (${entry} STREQUAL "PRIVATE" OR ${entry} STREQUAL "PUBLIC" OR ${entry} STREQUAL "INTERFACE") + set(writing_now ${entry}) else() - set(full_name ${src_loc}/${file}) - if (${file} MATCHES "(^|/)win/" OR ${file} MATCHES "(^|/)winrc/" OR ${file} MATCHES "(^|/)windows/" OR ${file} MATCHES "[_\\/]win\\.") + set(full_name ${src_loc}/${entry}) + if (${entry} MATCHES "(^|/)win/" OR ${entry} MATCHES "(^|/)winrc/" OR ${entry} MATCHES "(^|/)windows/" OR ${entry} MATCHES "[_\\/]win\\.") list(APPEND not_mac_sources ${full_name}) list(APPEND not_linux_sources ${full_name}) - elseif (${file} MATCHES "(^|/)mac/" OR ${file} MATCHES "(^|/)darwin/" OR ${file} MATCHES "(^|/)osx/" OR ${file} MATCHES "[_\\/]mac\\." OR ${file} MATCHES "[_\\/]darwin\\." OR ${file} MATCHES "[_\\/]osx\\.") + elseif (${entry} MATCHES "(^|/)mac/" OR ${entry} MATCHES "(^|/)darwin/" OR ${entry} MATCHES "(^|/)osx/" OR ${entry} MATCHES "[_\\/]mac\\." OR ${entry} MATCHES "[_\\/]darwin\\." OR ${entry} MATCHES "[_\\/]osx\\.") list(APPEND not_win_sources ${full_name}) list(APPEND not_linux_sources ${full_name}) - elseif (${file} MATCHES "(^|/)linux/" OR ${file} MATCHES "[_\\/]linux\\.") + elseif (${entry} MATCHES "(^|/)linux/" OR ${entry} MATCHES "[_\\/]linux\\.") list(APPEND not_win_sources ${full_name}) list(APPEND not_mac_sources ${full_name}) - elseif (${file} MATCHES "(^|/)posix/" OR ${file} MATCHES "[_\\/]posix\\.") + elseif (${entry} MATCHES "(^|/)posix/" OR ${entry} MATCHES "[_\\/]posix\\.") list(APPEND not_win_sources ${full_name}) endif() if ("${writing_now}" STREQUAL "PRIVATE") diff --git a/options.cmake b/options.cmake index 63ce374..56dbe48 100644 --- a/options.cmake +++ b/options.cmake @@ -7,15 +7,8 @@ add_library(common_options INTERFACE) add_library(desktop-app::common_options ALIAS common_options) -target_compile_features(common_options -INTERFACE - cxx_std_17 -) - target_compile_definitions(common_options INTERFACE - UNICODE - _UNICODE $,_DEBUG,NDEBUG> ) @@ -28,9 +21,9 @@ endif() if (WIN32) include(cmake/options_win.cmake) -elseif(APPLE) +elseif (APPLE) include(cmake/options_mac.cmake) -elseif(LINUX) +elseif (LINUX) include(cmake/options_linux.cmake) else() message(FATAL_ERROR "Unknown platform type") diff --git a/options_mac.cmake b/options_mac.cmake index 17300b6..955bd16 100644 --- a/options_mac.cmake +++ b/options_mac.cmake @@ -6,6 +6,61 @@ if (build_osx) target_compile_definitions(common_options INTERFACE OS_OSX) -elseif (build_macstore) - target_compile_definitions(common_options INTERFACE OS_MAC_STORE) +else() + if (build_macstore) + target_compile_definitions(common_options INTERFACE OS_MAC_STORE) + endif() + target_include_directories(common_options + INTERFACE + /usr/local/macos/include + ) endif() + +target_compile_options(common_options +INTERFACE + -pipe + -g + -Wall + -Werror + -W + -fPIE + -Wno-deprecated-declarations # temp for range-v3 + -Wno-unused-variable + -Wno-unused-parameter + -Wno-unused-function + -Wno-switch + -Wno-comment + -Wno-missing-field-initializers + -Wno-sign-compare + -Wno-unknown-attributes + -Wno-pragma-system-header-outside-header +) + +target_link_frameworks(common_options +INTERFACE + Cocoa + CoreFoundation + CoreServices + CoreText + CoreGraphics + CoreMedia + IOSurface + Metal + OpenGL + AudioUnit + ApplicationServices + Foundation + AGL + Security + SystemConfiguration + Carbon + AudioToolbox + VideoToolbox + VideoDecodeAcceleration + AVFoundation + CoreAudio + QuartzCore + AppKit + CoreWLAN + IOKit +) diff --git a/options_win.cmake b/options_win.cmake index c42f177..54906f7 100644 --- a/options_win.cmake +++ b/options_win.cmake @@ -11,6 +11,8 @@ INTERFACE _SCL_SECURE_NO_WARNINGS _USING_V110_SDK71_ NOMINMAX + UNICODE + _UNICODE ) target_compile_options(common_options INTERFACE @@ -65,6 +67,6 @@ INTERFACE Crypt32 ) -if (build_uwp) +if (build_winstore) target_compile_definitions(common_options INTERFACE OS_WIN_STORE) endif() diff --git a/target_link_frameworks.cmake b/target_link_frameworks.cmake new file mode 100644 index 0000000..f5fe9a6 --- /dev/null +++ b/target_link_frameworks.cmake @@ -0,0 +1,41 @@ +# This file is part of Desktop App Toolkit, +# a set of libraries for developing nice desktop applications. +# +# For license and copyright information please follow this link: +# https://github.com/desktop-app/legal/blob/master/LEGAL + +function(target_link_frameworks target_name) + set(list ${ARGV}) + list(REMOVE_AT list 0) + + set(writing_now "") + set(private_frameworks "") + set(public_frameworks "") + set(interface_frameworks "") + foreach (entry ${list}) + if (${entry} STREQUAL "PRIVATE" OR ${entry} STREQUAL "PUBLIC" OR ${entry} STREQUAL "INTERFACE") + set(writing_now ${entry}) + else() + set(full_argument "-framework ${entry}") + if ("${writing_now}" STREQUAL "PRIVATE") + list(APPEND private_frameworks ${full_argument}) + elseif ("${writing_now}" STREQUAL "PUBLIC") + list(APPEND public_frameworks ${full_argument}) + elseif ("${writing_now}" STREQUAL "INTERFACE") + list(APPEND interface_frameworks ${full_argument}) + else() + message(FATAL_ERROR "Unknown frameworks scope for target ${target_name}") + endif() + endif() + endforeach() + + if (NOT "${public_frameworks}" STREQUAL "") + target_link_libraries(${target_name} PUBLIC ${public_frameworks}) + endif() + if (NOT "${private_frameworks}" STREQUAL "") + target_link_libraries(${target_name} PRIVATE ${private_frameworks}) + endif() + if (NOT "${interface_frameworks}" STREQUAL "") + target_link_libraries(${target_name} INTERFACE ${interface_frameworks}) + endif() +endfunction() diff --git a/variables.cmake b/variables.cmake index d40d80c..2d20921 100644 --- a/variables.cmake +++ b/variables.cmake @@ -4,10 +4,6 @@ # For license and copyright information please follow this link: # https://github.com/desktop-app/legal/blob/master/LEGAL -get_filename_component(libs_loc "../Libraries" REALPATH) -get_filename_component(third_party_loc "Telegram/ThirdParty" REALPATH) -get_filename_component(submodules_loc "Telegram" REALPATH) - set(DESKTOP_APP_SPECIAL_TARGET "" CACHE STRING "Use special platform target, like 'mas' for Mac App Store.") option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." OFF) option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." OFF) @@ -23,11 +19,15 @@ if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "" set(disable_autoupdate 1) endif() -set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12) +set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "Minimum OS X deployment version" FORCE) + +set(build_osx 0) +set(build_macstore 0) +set(build_winstore 0) if (WIN32) if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp") - set(build_uwp 1) + set(build_winstore 1) elseif (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "" AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "win") report_bad_special_target() @@ -56,3 +56,11 @@ else() report_bad_special_target() endif() endif() + +if (NOT APPLE OR build_osx) + get_filename_component(libs_loc "../Libraries" REALPATH) +else() + get_filename_component(libs_loc "../Libraries/macos" REALPATH) +endif() +get_filename_component(third_party_loc "Telegram/ThirdParty" REALPATH) +get_filename_component(submodules_loc "Telegram" REALPATH)