From ad7819c1bf2f109d6d72365b91abfb096d7d4113 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 25 Jan 2025 20:19:00 +0100 Subject: [PATCH] Review iOS build excludes - fix #1984 (#3419) --- cpp/src/Ice/Instance.cpp | 8 ++++++-- cpp/src/Ice/Makefile.mk | 21 +++++++++++++++------ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index a037630558a..2def20f8a6d 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -55,7 +55,11 @@ #endif #ifndef _WIN32 -# include "SysLoggerI.h" + +# if !defined(__APPLE__) || TARGET_OS_IPHONE == 0 +# include "SysLoggerI.h" +# endif + # include "SystemdJournalI.h" # include @@ -1009,7 +1013,7 @@ IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator) if (!_initData.logger) { string logfile = _initData.properties->getIceProperty("Ice.LogFile"); -#ifndef _WIN32 +#if !defined(_WIN32) && (!defined(__APPLE__) || TARGET_OS_IPHONE == 0) if (_initData.properties->getIcePropertyAsInt("Ice.UseSyslog") > 0) { if (!logfile.empty()) diff --git a/cpp/src/Ice/Makefile.mk b/cpp/src/Ice/Makefile.mk index 7c7f18cfade..82847ae8e47 100644 --- a/cpp/src/Ice/Makefile.mk +++ b/cpp/src/Ice/Makefile.mk @@ -16,8 +16,6 @@ endif Ice_excludes = src/Ice/DLLMain.cpp Ice[shared]_excludes = src/Ice/RegisterPluginsInit_min.cpp -Ice[xcodesdk]_excludes = src/Ice/RegisterPluginsInit_min.cpp -Ice[static]_excludes = src/Ice/RegisterPluginsInit_all.cpp ifeq ($(os),Linux) ifeq ($(shell pkg-config --exists libsystemd 2> /dev/null && echo yes),yes) @@ -25,9 +23,20 @@ Ice_cppflags += -DICE_USE_SYSTEMD $(shell pkg-config endif endif -Ice[iphoneos]_excludes := $(wildcard src/Ice/CtrlCHandler.cpp $(addprefix $(currentdir)/,Tcp*.cpp Service.cpp)) -Ice[iphoneos]_extra_sources := $(wildcard $(addprefix $(currentdir)/ios/,*.cpp *.mm)) -Ice[iphonesimulator]_excludes = $(Ice[iphoneos]_excludes) -Ice[iphonesimulator]_extra_sources = $(Ice[iphoneos]_extra_sources) +ios_extrasources := $(wildcard $(addprefix $(currentdir)/ios/,*.cpp *.mm)) +ios_excludes := $(wildcard $(addprefix $(currentdir)/,\ + CtrlCHandler.cpp \ + OutputUtil.cpp \ + RegisterPluginsInit_all.cpp \ + Service.cpp \ + SysLoggerI.cpp \ + SystemdJournalI.cpp \ + Tcp*.cpp)) + +Ice[iphoneos]_excludes = $(ios_excludes) +Ice[iphoneos]_extra_sources = $(ios_extrasources) + +Ice[iphonesimulator]_excludes = $(ios_excludes) +Ice[iphonesimulator]_extra_sources = $(ios_extrasources) projects += $(project)