Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qmake: Separated platform-specific parts into config_*.pri
To clarify config.pri, the platform-specific configuration was moved to their own .pri files. Also, clearing up Mac config with three distinct options: native SDK with qmake default settings (not for distribution), 10.6+ 64-bit Intel, and 10.4+ 32-bit Intel/PPC.
- Loading branch information
Showing
6 changed files
with
209 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# The Doomsday Engine Project | ||
# Copyright (c) 2011-2012 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
# Copyright (c) 2011-2012 Daniel Swanson <danij@dengine.net> | ||
|
||
include(config_unix_any.pri) | ||
|
||
DEFINES += MACOSX | ||
|
||
CONFIG += deng_nofixedasm | ||
|
||
# The native SDK option assumes the build is not for distribution. | ||
!deng_nativesdk { | ||
contains(QT_VERSION, ^4\\.[0-6]\\..*) { | ||
# 4.6 or earlier, assume Tiger with 32-bit Universal Intel/PowerPC binaries. | ||
CONFIG += deng_macx4u_32bit | ||
} | ||
else { | ||
# 4.7 or newer, assume Snow Leopard with 64-bit only Intel. | ||
CONFIG += deng_macx6_64bit | ||
} | ||
} | ||
|
||
QMAKE_LFLAGS += -flat_namespace -undefined suppress | ||
|
||
# Apply deng_* Configuration ------------------------------------------------- | ||
|
||
# Three options: | ||
# - deng_nativesdk | ||
# - deng_macx4u_32bit | ||
# - deng_macx6_64bit | ||
|
||
deng_nativesdk { | ||
echo(Using native SDK.) | ||
} | ||
else:deng_macx6_64bit { | ||
echo(Using 64-bit only 10.6+ SDK.) | ||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 | ||
QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.6.sdk | ||
INCLUDEPATH = $$QMAKE_MAC_SDK/usr/X11/include $$INCLUDEPATH | ||
QMAKE_INCDIR_QT = $${QMAKE_MAC_SDK}$$QMAKE_INCDIR_QT | ||
} | ||
else:deng_macx4u_32bit { | ||
error("32-bit 10.4+ SDK still wip.") | ||
} | ||
else { | ||
error(Unspecified SDK configuration.) | ||
} | ||
|
||
#deng_nativesdk { | ||
# echo("Using SDK for your Mac OS version.") | ||
# QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 | ||
#} | ||
#else:deng_snowleopard { | ||
# echo("Using Mac OS 10.6 SDK.") | ||
# QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.6.sdk | ||
# QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 | ||
# CONFIG += x86 x86_64 | ||
# | ||
# deng_32bitonly { | ||
# CONFIG -= x86_64 | ||
# QMAKE_CFLAGS_X86_64 = "" | ||
# QMAKE_OBJECTIVE_CFLAGS_X86_64 = "" | ||
# QMAKE_LFLAGS_X86_64 = "" | ||
# } | ||
#} | ||
#else { | ||
# echo("Using Mac OS 10.4 SDK.") | ||
# echo("Architectures: 32-bit Intel + 32-bit PowerPC.") | ||
# QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk | ||
# QMAKE_CFLAGS += -mmacosx-version-min=10.4 | ||
# DEFINES += MACOS_10_4 | ||
# CONFIG += x86 ppc | ||
#} | ||
|
||
#!deng_nativesdk { | ||
# # Not using Qt, and anyway these would not point to the chosen SDK. | ||
# QMAKE_INCDIR_QT = "" | ||
# QMAKE_LIBDIR_QT = "" | ||
#} | ||
|
||
# What's our arch? | ||
archs = "Architectures:" | ||
ppc: archs += ppc32 | ||
x86: archs += intel32 | ||
x86_64: archs += intel64 | ||
echo($$archs) | ||
|
||
# Macros --------------------------------------------------------------------- | ||
|
||
defineTest(useFramework) { | ||
LIBS += -framework $$1 | ||
INCLUDEPATH += $$QMAKE_MAC_SDK/System/Library/Frameworks/$${1}.framework/Headers | ||
export(LIBS) | ||
export(INCLUDEPATH) | ||
return(true) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# The Doomsday Engine Project | ||
# Copyright (c) 2011-2012 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
# Copyright (c) 2011-2012 Daniel Swanson <danij@dengine.net> | ||
# | ||
# Unix configuration (non-Mac). | ||
|
||
include(config_unix_any.pri) | ||
|
||
CONFIG += deng_nofixedasm | ||
|
||
!deng_nosnowberry: CONFIG += deng_snowberry | ||
|
||
exists(/etc/apt) { | ||
# Choose the apt repository to include in the distribution. | ||
isStableRelease(): CONFIG += deng_aptstable | ||
else: CONFIG += deng_aptunstable | ||
} | ||
|
||
# Link against standard math library. | ||
LIBS += -lm | ||
|
||
# Install prefix. | ||
isEmpty(PREFIX) { | ||
freebsd-*: PREFIX = /usr/local | ||
else: PREFIX = /usr | ||
} | ||
|
||
# Binary location. | ||
DENG_BIN_DIR = $$PREFIX/bin | ||
|
||
# Library location. | ||
DENG_LIB_DIR = $$PREFIX/lib | ||
|
||
contains(QMAKE_HOST.arch, x86_64) { | ||
exists($$PREFIX/lib64) { | ||
DENG_LIB_DIR = $$PREFIX/lib64 | ||
} | ||
exists($$PREFIX/lib/x86_64-linux-gnu) { | ||
DENG_LIB_DIR = $$PREFIX/lib/x86_64-linux-gnu | ||
} | ||
} | ||
|
||
DENG_BASE_DIR = $$PREFIX/share/doomsday | ||
DENG_DATA_DIR = $$DENG_BASE_DIR/data | ||
|
||
echo(Binary directory: $$DENG_BIN_DIR) | ||
echo(Library directory: $$DENG_LIB_DIR) | ||
echo(Doomsday base directory: $$DENG_BASE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# The Doomsday Engine Project | ||
# Copyright (c) 2011-2012 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
# Copyright (c) 2011-2012 Daniel Swanson <danij@dengine.net> | ||
|
||
# Common Unix build options for all Unix-compatible platforms (assumes gcc). | ||
|
||
DEFINES += UNIX | ||
|
||
# Ease up on the warnings. (The old C code is a bit messy.) | ||
QMAKE_CFLAGS_WARN_ON -= -Wall | ||
QMAKE_CFLAGS_WARN_ON -= -W | ||
QMAKE_CFLAGS_WARN_ON += -Werror-implicit-function-declaration | ||
|
||
# Print include directories and other info. | ||
#QMAKE_CFLAGS += -Wp,-v | ||
|
||
# Unix System Tools ---------------------------------------------------------- | ||
|
||
# Python to be used in generated scripts. | ||
isEmpty(SCRIPT_PYTHON) { | ||
exists(/usr/bin/python): SCRIPT_PYTHON = /usr/bin/python | ||
exists(/usr/local/bin/python): SCRIPT_PYTHON = /usr/local/bin/python | ||
} | ||
isEmpty(SCRIPT_PYTHON) { | ||
# Check the system path. | ||
SCRIPT_PYTHON = $$system(which python) | ||
} |
Oops, something went wrong.