Browse Source

qt: fix TARGET_OS_IPHONE macro usage

TARGET_OS_* macros from TargetConditionals.h are always defined (to 0
or 1), so checking `defined(TARGET_OS_IPHONE)` is incorrect. Because of
this, the Qt check executable wasn't probed anymore on MacOS.

Instead, check the macro value directly. Also include
TargetConditionals.h which was missing.
pull/198/head
Alexandre Janniaux 6 months ago
committed by Felix Paul Kühne
parent
commit
6d893f0037
  1. 6
      modules/gui/qt/qt.cpp

6
modules/gui/qt/qt.cpp

@ -47,6 +47,10 @@ QT_END_NAMESPACE
extern "C" char **environ;
#endif
#ifdef __APPLE__
# include <TargetConditionals.h>
#endif
#include <QApplication>
#include <QDate>
#include <QMutex>
@ -557,7 +561,7 @@ static int OpenInternal( qt_intf_t *p_intf )
return VLC_EGENERIC;
#endif
#if (_POSIX_SPAWN >= 0) && !defined(TARGET_OS_IPHONE)
#if (_POSIX_SPAWN >= 0) && (!defined(__APPLE__) || TARGET_OS_OSX)
/* Check if QApplication works */
/* Note: Disabled on iOS/tvOS/visionOS as process spawning is not allowed */
char *path = config_GetSysPath(VLC_PKG_LIBEXEC_DIR, "vlc-qt-check");

Loading…
Cancel
Save