Skip to content

Commit

Permalink
Review iOS build excludes - fix #1984 (#3419)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Jan 25, 2025
1 parent 02ad938 commit ad7819c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
8 changes: 6 additions & 2 deletions cpp/src/Ice/Instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <csignal>
Expand Down Expand Up @@ -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())
Expand Down
21 changes: 15 additions & 6 deletions cpp/src/Ice/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,27 @@ 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)
Ice_cppflags += -DICE_USE_SYSTEMD $(shell pkg-config --cflags libsystemd)
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)

0 comments on commit ad7819c

Please sign in to comment.