From c3c8c8ec2d987a6a3249716b2fff50fda0117119 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Thu, 23 Nov 2017 01:20:46 +0200 Subject: [PATCH] Manually cotire objc++ files --- Telegram/CMakeLists.txt | 6 +++++- Telegram/SourceFiles/platform/mac/file_utilities_mac.mm | 1 + Telegram/SourceFiles/platform/mac/mac_utilities.mm | 1 + Telegram/SourceFiles/platform/mac/main_window_mac.mm | 1 + .../SourceFiles/platform/mac/notifications_manager_mac.mm | 1 + Telegram/SourceFiles/platform/mac/specific_mac.mm | 1 + Telegram/SourceFiles/platform/mac/specific_mac_p.mm | 1 + Telegram/SourceFiles/platform/mac/window_title_mac.mm | 1 + 8 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 5021acd11..3ebb6b2a8 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -515,7 +515,7 @@ include_directories(/usr/local/opt/openal-soft/include) add_definitions(-Wno-switch) # End remove me if (WIN32) - add_definitions(-D_CRT_SECURE_NO_WARNINGS -DWIN32 -D_WINDOWS -DUNICODE -DWIN64 -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -DWIN32 -D_WINDOWS -DUNICODE -DWIN64 -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP) endif() add_definitions(-DTDESKTOP_DISABLE_CRASH_REPORTS) @@ -560,6 +560,10 @@ set_target_properties(Telegram ) cotire(Telegram) +# See https://github.com/sakra/cotire/blob/master/MANUAL.md#objective-c +# ObjC and ObjC++ files cannot be cotired, so they have to include appropriate Qt and Tg +# headers themselves, this applies to macOS platform sources. + ##====================== if (APPLE) diff --git a/Telegram/SourceFiles/platform/mac/file_utilities_mac.mm b/Telegram/SourceFiles/platform/mac/file_utilities_mac.mm index 5ec91732b..c47729098 100644 --- a/Telegram/SourceFiles/platform/mac/file_utilities_mac.mm +++ b/Telegram/SourceFiles/platform/mac/file_utilities_mac.mm @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "stdafx.h" #include "platform/mac/file_utilities_mac.h" #include "platform/mac/mac_utilities.h" diff --git a/Telegram/SourceFiles/platform/mac/mac_utilities.mm b/Telegram/SourceFiles/platform/mac/mac_utilities.mm index 020fed534..0106f3b97 100644 --- a/Telegram/SourceFiles/platform/mac/mac_utilities.mm +++ b/Telegram/SourceFiles/platform/mac/mac_utilities.mm @@ -15,4 +15,5 @@ GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "stdafx.h" #include "platform/mac/mac_utilities.h" diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.mm b/Telegram/SourceFiles/platform/mac/main_window_mac.mm index b433bcb64..423fcf48b 100644 --- a/Telegram/SourceFiles/platform/mac/main_window_mac.mm +++ b/Telegram/SourceFiles/platform/mac/main_window_mac.mm @@ -15,6 +15,7 @@ GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "stdafx.h" #include "platform/mac/main_window_mac.h" #include "styles/style_window.h" diff --git a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm index d6e8e5d92..6d8ac0b17 100644 --- a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm +++ b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "stdafx.h" #include "platform/mac/notifications_manager_mac.h" #include "platform/platform_specific.h" diff --git a/Telegram/SourceFiles/platform/mac/specific_mac.mm b/Telegram/SourceFiles/platform/mac/specific_mac.mm index a801af673..e057d9b6c 100644 --- a/Telegram/SourceFiles/platform/mac/specific_mac.mm +++ b/Telegram/SourceFiles/platform/mac/specific_mac.mm @@ -15,6 +15,7 @@ GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "stdafx.h" #include "platform/mac/specific_mac.h" #include diff --git a/Telegram/SourceFiles/platform/mac/specific_mac_p.mm b/Telegram/SourceFiles/platform/mac/specific_mac_p.mm index 422add55f..1bdafebe7 100644 --- a/Telegram/SourceFiles/platform/mac/specific_mac_p.mm +++ b/Telegram/SourceFiles/platform/mac/specific_mac_p.mm @@ -15,6 +15,7 @@ GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "stdafx.h" #include "platform/mac/specific_mac_p.h" #include "mainwindow.h" diff --git a/Telegram/SourceFiles/platform/mac/window_title_mac.mm b/Telegram/SourceFiles/platform/mac/window_title_mac.mm index 0d5151e14..3e7ddaf52 100644 --- a/Telegram/SourceFiles/platform/mac/window_title_mac.mm +++ b/Telegram/SourceFiles/platform/mac/window_title_mac.mm @@ -18,6 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ +#include "stdafx.h" #include "platform/mac/window_title_mac.h" #include "mainwindow.h"