Skip to content

Commit 7cbdff4

Browse files
committed
Fix mac compilation when Qt Frameworks are in use.
Qt has a special handling for mac frameworks that includes header files. Resetting QMAKE_LIBDIR_QT breaks qmake from generating proper makefile with correct include path. Fix various other issues such as QMAKE_LFLAGS being never properly set. For the time being limit the change to mac compilation in order to minimise the risk of breaking something else elsewhere. HD homerun compilation failed due to sig_t being previously defined in sys/signal.h Conflicts: mythtv/libs/libmythmetadata/libmythmetadata.pro [cherry-picked from 5dccbd5]
1 parent 4457494 commit 7cbdff4

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

mythtv/configure

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4754,6 +4754,11 @@ EOF
47544754

47554755
#echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
47564756

4757+
# Should be done on all platforms, but for the time being limit it to mac only
4758+
if enabled darwin; then
4759+
echo "QMAKE_LFLAGS+=$LDFLAGS" >> $TMPMAK
4760+
fi
4761+
47574762
cp_if_changed $TMPH $MYTH_CONFIG_H
47584763

47594764
if ! test -L config.h ; then

mythtv/libs/libmythhdhomerun/hdhomerun_os_posix.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050
#include <pthread.h>
5151

5252
typedef int bool_t;
53+
54+
#if !defined(_DARWIN_C_SOURCE)
5355
typedef void (*sig_t)(int);
56+
#endif
5457

5558
#define LIBTYPE
5659
#define console_vprintf vprintf

mythtv/libs/libmythmetadata/libmythmetadata.pro

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ inc.files += quicksp.h metadatacommon.h metadatadownload.h metadataimagedownload
5353

5454
INSTALLS += inc
5555

56-
macx {
57-
58-
QMAKE_LFLAGS_SHLIB += -flat_namespace
59-
}
60-
6156
QT += network xml sql
6257

6358
include ( ../libs-targetfix.pro )

mythtv/settings.pro

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,12 @@ LOCAL_LIBDIR_OGL =
140140
}
141141
QMAKE_LIBDIR_OPENGL =
142142

143-
!isEmpty( QMAKE_LIBDIR_QT ) {
144-
LATE_LIBS += "-L$$QMAKE_LIBDIR_QT"
145-
QMAKE_LIBDIR_QT = ""
143+
!macx {
144+
!isEmpty( QMAKE_LIBDIR_QT ) {
145+
LATE_LIBS += "-L$$QMAKE_LIBDIR_QT"
146+
QMAKE_LIBDIR_QT = ""
147+
}
146148
}
147-
148149
EXTRA_LIBS = $$EXTRALIBS
149150

150151
EXTRA_LIBS += $$FREETYPE_LIBS

0 commit comments

Comments
 (0)