blob: 39eec9bb560623e1db497936fd1681cf5cb09c87 [file] [log] [blame]
# -------------------------------------------------------------------
# QtWebKit defaults for qmake. These rules are parsed before the
# actual project file.
#
# See 'Tools/qmake/README' for an overview of the build system
# -------------------------------------------------------------------
# Allow environment tweaks to pre-loaded .qmake.cache content
env_cache = $$(QMAKE_CACHE_EVAL)
eval($$env_cache)
load(functions)
# Derived sources often need QMAKE_MOC
load(qt_functions)
load(moc)
# FIXME: In this case we probably want to exit early so that we
# don't load all of the custom build tweaks needlessly.
pro_file = $$_PRO_FILE_ # Checking the variable directly does not work
isEmpty(pro_file): CONFIG += recursive_include
# Resolve root directories for source and build
ROOT_WEBKIT_DIR = $$replace(PWD, /Tools/qmake/mkspecs/features$,)
WEBKIT_SUBDIR = $$replace(_PRO_FILE_PWD_, $${ROOT_WEBKIT_DIR},)
ROOT_BUILD_DIR = $$replace(OUT_PWD, $${WEBKIT_SUBDIR}$,)
# Now we're ready to load default_pre from Qt
load(default_pre)
equals(OUT_PWD, $${ROOT_BUILD_DIR}) {
!recursive_include:CONFIG += root_project_file
BUILD_ROOT_RELATIVE_TO_OUT_PWD = .
} else {
subdir_parts = $$replace(OUT_PWD, ^$${ROOT_BUILD_DIR}/,)
subdir_parts = $$split(subdir_parts, /)
for(subdir, subdir_parts) {
BUILD_ROOT_RELATIVE_TO_OUT_PWD += ..
}
BUILD_ROOT_RELATIVE_TO_OUT_PWD = $$join(BUILD_ROOT_RELATIVE_TO_OUT_PWD, /)
}
# Try to detect if we're running under Windows cmd.exe or not
win32* {
pwd = $$(PWD) # Normally empty for cmd.exe
pwd_starts_with_slash = $$find(pwd, ^/)
isEmpty(pwd_starts_with_slash): CONFIG += win_cmd_shell
}
# Default location of generated sources
GENERATED_SOURCES_DESTDIR = generated
QUOTE = ""
DOUBLE_ESCAPED_QUOTE = ""
ESCAPE = ""
win_cmd_shell {
ESCAPE = "^"
} else {
QUOTE = "\'"
DOUBLE_ESCAPED_QUOTE = "\\\'"
}
EOL = $$escape_expand(\\n)
EOC = $$escape_expand(\\n\\t)
TAB = $$escape_expand(\\t)
MAKEFILE_NOOP_COMMAND = @echo -n
win32-msvc*: MAKEFILE_NOOP_COMMAND = @echo >NUL
# Help keep the build tree clean
MOC_DIR = moc
RCC_DIR = rcc
OBJECTS_DIR = obj/$$activeBuildConfig()
# Set up a default python version
scratchbox: PYTHON = python2.6
else: PYTHON = python
# Run configure before making decisions that depend on the result
root_project_file {
load(configure)
runConfigure()
}
unix:config_gccdepends {
# We have a compiler that supports the -MD option (and neither
# teambuilder nor icecream is messing up the .d file output).
CONFIG += GNUmake gcc_MD_depends
}
# We use private_tests to detect developer build, since the destdir will
# always be our webkit build dir. This might change as configure changes.
contains(QT_CONFIG, private_tests): CONFIG += qt_developer_build
# Set some defaults for specific platforms
CONFIG += include_webinspector
# By default we enable "production build", and build-webkit, which is
# used by bots and developers, will disable it, to enable warnings etc.
CONFIG += production_build
# Pick up Qt's defaults for debug/release/debug_and_release
if(win32|mac):!macx-xcode {
contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
contains(QT_CONFIG, build_all): CONFIG += build_all
}
# Try to locate sqlite3 source (for WebCore)
SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
isEmpty(SQLITE3SRCDIR) {
SQLITE3SRCDIR = $$QT.core.sources/../3rdparty/sqlite/
}
# A newer version of flex is required on Windows. At the moment the only
# one that appears to provide binaries and is not cygwin is winflex.
FLEX = flex
win32: FLEX = win_flex
BIN_EXTENSION =
win32: BIN_EXTENSION = .exe