Skip to content

Commit

Permalink
Fix mac compilation when Qt Frameworks are in use.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jyavenard committed Mar 2, 2012
1 parent 20d6852 commit 5dccbd5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions mythtv/configure
Expand Up @@ -4949,6 +4949,11 @@ EOF

#echo "endif # FFMPEG_CONFIG_MAK" >> $TMPMAK

# Should be done on all platforms, but for the time being limit it to mac only
if enabled darwin; then
echo "QMAKE_LFLAGS+=$LDFLAGS" >> $TMPMAK
fi

cp_if_changed $TMPH $MYTH_CONFIG_H

if ! test -L config.h ; then
Expand Down
3 changes: 3 additions & 0 deletions mythtv/libs/libmythhdhomerun/hdhomerun_os_posix.h
Expand Up @@ -50,7 +50,10 @@
#include <pthread.h>

typedef int bool_t;

#if !defined(_DARWIN_C_SOURCE)
typedef void (*sig_t)(int);
#endif

#define LIBTYPE
#define console_vprintf vprintf
Expand Down
3 changes: 0 additions & 3 deletions mythtv/libs/libmythmetadata/libmythmetadata.pro
Expand Up @@ -68,9 +68,6 @@ inc.files += mythuiimageresults.h metadataimagehelper.h
INSTALLS += inc

macx {

QMAKE_LFLAGS_SHLIB += -flat_namespace

using_firewire:using_backend:LIBS += -F$${CONFIG_MAC_AVC} -framework AVCVideoServices
}

Expand Down
9 changes: 5 additions & 4 deletions mythtv/settings.pro
Expand Up @@ -138,11 +138,12 @@ LOCAL_LIBDIR_OGL =
}
QMAKE_LIBDIR_OPENGL =

!isEmpty( QMAKE_LIBDIR_QT ) {
LATE_LIBS += "-L$$QMAKE_LIBDIR_QT"
QMAKE_LIBDIR_QT = ""
!macx {
!isEmpty( QMAKE_LIBDIR_QT ) {
LATE_LIBS += "-L$$QMAKE_LIBDIR_QT"
QMAKE_LIBDIR_QT = ""
}
}

EXTRA_LIBS = $$EXTRALIBS

EXTRA_LIBS += $$FREETYPE_LIBS
Expand Down

0 comments on commit 5dccbd5

Please sign in to comment.