Permalink
Browse files

Fix compilation with clang/clang++ - configure: we can't use CFLAGS f…

…or compiling C++ code, especially as CFLAGS would include -std=c99 which makes no sense for C++ - util-osx-cocoa.mm was compiled as a C++ file, not an objective-C++ file, gcc was forgiving about the error, clang++ isn't
  • Loading branch information...
jyavenard committed Jun 14, 2012
1 parent 31e5b9d commit 12a3eac312d06257ba1dca771ee710eacda6ce1e
Showing with 7 additions and 11 deletions.
  1. +1 −1 mythtv/configure
  2. +6 −10 mythtv/libs/libmythui/libmythui.pro
View
@@ -738,7 +738,7 @@ check_cxx(){
log check_cxx "$@"
cat > $TMPCPP
log_file $TMPCPP
check_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" -c -o $TMPO $TMPCPP
check_cmd $cxx $CPPFLAGS $CXXFLAGS "$@" -c -o $TMPO $TMPCPP
}
check_cpp(){
@@ -95,16 +95,12 @@ using_x11 {
}
macx {
QMAKE_EXT_CPP += .mm
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
HEADERS += screensaver-osx.h DisplayResOSX.h util-osx.h util-osx-cocoa.h
SOURCES += screensaver-osx.cpp DisplayResOSX.cpp util-osx.cpp util-osx-cocoa.mm
QMAKE_CXXFLAGS += -F/System/Library/Frameworks/CoreServices.framework/Frameworks
QMAKE_CXXFLAGS += -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
QMAKE_CXXFLAGS += -F/System/Library/Frameworks/Carbon.framework/Frameworks
QMAKE_CXXFLAGS += -F/System/Library/Frameworks/Cocoa.framework/Frameworks
LIBS += -framework Carbon -framework Cocoa -framework IOKit
HEADERS += screensaver-osx.h DisplayResOSX.h util-osx.h
SOURCES += screensaver-osx.cpp DisplayResOSX.cpp util-osx.cpp
QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_CXXFLAGS
OBJECTIVE_HEADERS += util-osx-cocoa.h
OBJECTIVE_SOURCES += util-osx-cocoa.mm
LIBS += -framework Carbon -framework Cocoa -framework IOKit
using_appleremote {
HEADERS += AppleRemote.h AppleRemoteListener.h

0 comments on commit 12a3eac

Please sign in to comment.