From 2178ccb48807b3af171cc2aed0be54a9eebb75c5 Mon Sep 17 00:00:00 2001 From: skyjake Date: Tue, 20 Sep 2011 19:54:58 +0300 Subject: [PATCH] Mac: Further qmake config tweaks Allow defining SDL framework dir in config_user.pri. Also don't use the default Qt include and library directories when using a specific SDK package, because that would mess with the include paths (frameworks in the SDK will include the wrong headers). --- doomsday/config.pri | 10 +++++----- doomsday/dep_libpng.pri | 2 +- doomsday/dep_sdl.pri | 4 +++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/doomsday/config.pri b/doomsday/config.pri index 79056e492a..706bf30883 100644 --- a/doomsday/config.pri +++ b/doomsday/config.pri @@ -147,12 +147,12 @@ macx { QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk QMAKE_CFLAGS += -mmacosx-version-min=10.4 DEFINES += MACOS_10_4 - CONFIG += x86 ppc - - # Not using Qt, and anyway these would not point to the 10.4u SDK. - QMAKE_INCDIR_QT = "" - QMAKE_LIBDIR_QT = "" + CONFIG += x86 ppc } + + # Not using Qt, and anyway these would not point to the chosen SDK. + QMAKE_INCDIR_QT = "" + QMAKE_LIBDIR_QT = "" defineTest(useFramework) { LIBS += -framework $$1 diff --git a/doomsday/dep_libpng.pri b/doomsday/dep_libpng.pri index 9ce4214817..7ee52c77ed 100644 --- a/doomsday/dep_libpng.pri +++ b/doomsday/dep_libpng.pri @@ -16,7 +16,7 @@ else:macx { } else { # Use a static libpng from MacPorts (ppc+i386). INCLUDEPATH += /opt/local/include - LIBS += /opt/local/lib/libpng.a + LIBS += /opt/local/lib/libpng.a } } else { diff --git a/doomsday/dep_sdl.pri b/doomsday/dep_sdl.pri index 304f668bd1..e216088d1b 100644 --- a/doomsday/dep_sdl.pri +++ b/doomsday/dep_sdl.pri @@ -28,7 +28,9 @@ win32 { } else:macx { # Mac OS X. - SDL_FRAMEWORK_DIR = $$(HOME)/Library/Frameworks + isEmpty(SDL_FRAMEWORK_DIR) { + error("dep_sdl: SDL framework path not defined, check your config_user.pri") + } INCLUDEPATH += \ $${SDL_FRAMEWORK_DIR}/SDL.framework/Headers \