2012-12-11 21:08:15 +00:00
|
|
|
#
|
|
|
|
# W A R N I N G
|
|
|
|
# -------------
|
|
|
|
#
|
|
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
|
|
# implementation detail. It may change from version to version
|
|
|
|
# without notice, or even be removed.
|
|
|
|
#
|
|
|
|
# We mean it.
|
|
|
|
#
|
|
|
|
|
2012-08-07 17:00:38 +00:00
|
|
|
!no_qt_module_warning:!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
|
|
|
|
QMAKE_ACTUAL_PRO_FILE = $$basename(_PRO_FILE_)
|
|
|
|
isEmpty(QMAKE_ACTUAL_PRO_FILE): QMAKE_ACTUAL_PRO_FILE=.pro
|
|
|
|
warning("You should probably load(qt_build_config) first in $$QMAKE_ACTUAL_PRO_FILE for $$TARGET, as the latter also load()s qt_module.")
|
|
|
|
message("Not doing so may lead to qt_module.prf overriding compiler/linker options in your .pro file.")
|
|
|
|
message("Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing.")
|
|
|
|
unset(QMAKE_ACTUAL_PRO_FILE)
|
|
|
|
}
|
|
|
|
load(qt_build_config) # loads qmodule.pri if hasn't been loaded already
|
|
|
|
|
|
|
|
isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
|
2013-02-26 10:25:52 +00:00
|
|
|
isEmpty(VERSION): VERSION = $$MODULE_VERSION
|
|
|
|
isEmpty(VERSION): error("Module does not define version.")
|
2012-08-07 17:00:38 +00:00
|
|
|
|
|
|
|
# Compile as shared/DLL or static according to the option given to configure
|
2012-10-29 16:25:30 +00:00
|
|
|
# unless overridden. Host builds are always static
|
|
|
|
host_build|staticlib: CONFIG += static
|
2012-08-07 17:00:38 +00:00
|
|
|
|
2013-03-08 20:45:43 +00:00
|
|
|
host_build {
|
|
|
|
QT -= gui # no host module will ever use gui
|
|
|
|
force_bootstrap {
|
|
|
|
!build_pass: CONFIG += release
|
|
|
|
contains(QT, core(-private)?|xml) {
|
|
|
|
QT -= core core-private xml
|
|
|
|
QT += bootstrap-private
|
|
|
|
}
|
2013-03-25 14:57:01 +00:00
|
|
|
} else {
|
|
|
|
!build_pass:contains(QT_CONFIG, build_all): CONFIG += release
|
2013-03-08 20:45:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-07 17:00:38 +00:00
|
|
|
ucmodule = $$upper($$MODULE)
|
|
|
|
|
2012-11-29 21:22:42 +00:00
|
|
|
isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET
|
|
|
|
|
2013-10-21 19:05:35 +00:00
|
|
|
internal_module: \
|
|
|
|
MODULE_DEPENDS = $$replace(QT, -private$, _private)
|
|
|
|
else: \
|
|
|
|
MODULE_DEPENDS = $$replace(QT, -private$, )
|
2012-09-03 10:19:39 +00:00
|
|
|
MODULE_DEPENDS = $$unique(MODULE_DEPENDS)
|
2012-08-07 17:00:38 +00:00
|
|
|
|
2012-08-30 11:46:14 +00:00
|
|
|
contains(TARGET, QtAddOn.*): \
|
|
|
|
MODULE_DEFINE = QT_ADDON_$${ucmodule}_LIB
|
|
|
|
else: \
|
|
|
|
MODULE_DEFINE = QT_$${ucmodule}_LIB
|
|
|
|
MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES
|
|
|
|
|
2013-01-28 20:07:14 +00:00
|
|
|
load(qt_module_pris)
|
2012-08-07 17:00:38 +00:00
|
|
|
|
2013-10-21 19:05:35 +00:00
|
|
|
INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}_private.includes)
|
2012-08-07 17:00:38 +00:00
|
|
|
|
2012-10-29 16:25:30 +00:00
|
|
|
!no_module_headers: load(qt_module_headers)
|
2012-08-07 17:00:38 +00:00
|
|
|
|
|
|
|
#other
|
|
|
|
TEMPLATE = lib
|
2013-10-21 19:05:35 +00:00
|
|
|
DESTDIR = $$eval(QT.$${MODULE_ID}.libs)
|
|
|
|
win32:!wince*:!prefix_build: DLLDESTDIR = $$eval(QT.$${MODULE_ID}.bins)
|
2012-08-07 17:00:38 +00:00
|
|
|
|
|
|
|
CONFIG += qmake_cache target_qt
|
|
|
|
|
2012-11-30 20:07:47 +00:00
|
|
|
QMAKE_DOCS_TARGETDIR = qt$${MODULE}
|
2012-10-08 15:19:14 +00:00
|
|
|
|
2012-08-07 17:00:38 +00:00
|
|
|
# If Qt was configured with -debug-and-release then build the module the same way
|
2012-10-29 16:25:30 +00:00
|
|
|
# - unless this is a host library
|
|
|
|
!host_build:if(win32|mac):!macx-xcode {
|
2012-08-07 17:00:38 +00:00
|
|
|
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
|
|
|
|
contains(QT_CONFIG, build_all):CONFIG += build_all
|
|
|
|
}
|
|
|
|
|
|
|
|
linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|
|
|
|
|
|
|
|
QT += $$QT_FOR_PRIVATE
|
|
|
|
unset(QT_FOR_PRIVATE)
|
|
|
|
|
2012-08-27 17:56:04 +00:00
|
|
|
!internal_module:CONFIG += create_cmake
|
2012-08-07 17:00:38 +00:00
|
|
|
|
|
|
|
contains(TARGET, QtAddOn.*): \
|
|
|
|
DEFINES += QT_BUILD_ADDON_$${ucmodule}_LIB
|
|
|
|
else: \
|
|
|
|
DEFINES += QT_BUILD_$${ucmodule}_LIB
|
|
|
|
|
2013-07-09 14:07:07 +00:00
|
|
|
# OS X and iOS frameworks
|
2013-02-15 18:28:28 +00:00
|
|
|
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
|
2012-08-07 17:00:38 +00:00
|
|
|
#QMAKE_FRAMEWORK_VERSION = 4.0
|
2013-07-11 13:43:32 +00:00
|
|
|
CONFIG += lib_bundle sliced_bundle qt_framework
|
2013-08-30 21:14:40 +00:00
|
|
|
CONFIG -= qt_install_headers #no need to install these as well
|
2013-11-14 19:14:14 +00:00
|
|
|
!debug_and_release|!build_all|CONFIG(release, debug|release) {
|
2013-06-18 12:36:10 +00:00
|
|
|
FRAMEWORK_HEADERS.version = Versions
|
|
|
|
FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
|
|
|
|
FRAMEWORK_HEADERS.path = Headers
|
|
|
|
FRAMEWORK_PRIVATE_HEADERS.files = $$SYNCQT.PRIVATE_HEADER_FILES
|
2013-06-28 08:48:31 +00:00
|
|
|
FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME/private
|
2013-06-28 09:07:44 +00:00
|
|
|
FRAMEWORK_QPA_HEADERS.files = $$SYNCQT.QPA_HEADER_FILES
|
|
|
|
FRAMEWORK_QPA_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME/qpa
|
|
|
|
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS FRAMEWORK_PRIVATE_HEADERS FRAMEWORK_QPA_HEADERS
|
2012-08-07 17:00:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mac {
|
|
|
|
CONFIG += explicitlib
|
|
|
|
macx-g++ {
|
|
|
|
QMAKE_CFLAGS += -fconstant-cfstrings
|
|
|
|
QMAKE_CXXFLAGS += -fconstant-cfstrings
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINES += QT_BUILDING_QT
|
|
|
|
win32 {
|
|
|
|
INCLUDEPATH += tmp
|
2012-10-16 02:45:16 +00:00
|
|
|
CONFIG += skip_target_version_ext
|
2012-08-07 17:00:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
aix-g++* {
|
|
|
|
QMAKE_CFLAGS += -mminimal-toc
|
|
|
|
QMAKE_CXXFLAGS += -mminimal-toc
|
|
|
|
}
|
|
|
|
|
2013-03-04 09:16:42 +00:00
|
|
|
android: CONFIG += qt_android_deps
|
|
|
|
|
2012-08-07 17:00:38 +00:00
|
|
|
#install directives
|
|
|
|
load(qt_installs)
|
|
|
|
|
2013-11-25 16:52:37 +00:00
|
|
|
!isEmpty(_QMAKE_SUPER_CACHE_): \
|
|
|
|
rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
|
|
|
|
else: \
|
|
|
|
rplbase = $$MODULE_BASE_OUTDIR
|
|
|
|
include_replace.match = $$rplbase/include
|
|
|
|
include_replace.replace = $$[QT_INSTALL_HEADERS/raw]
|
|
|
|
include_replace.CONFIG = path
|
|
|
|
lib_replace.match = $$rplbase/lib
|
|
|
|
host_build: \
|
|
|
|
lib_replace.replace = $$[QT_HOST_LIBS]
|
|
|
|
else: \
|
|
|
|
lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
|
|
|
|
lib_replace.CONFIG = path
|
|
|
|
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace
|
|
|
|
|
2012-08-07 17:00:38 +00:00
|
|
|
unix|win32-g++* {
|
|
|
|
CONFIG += create_pc
|
2013-11-25 16:52:37 +00:00
|
|
|
QMAKE_PKGCONFIG_LIBDIR = $$lib_replace.replace
|
|
|
|
QMAKE_PKGCONFIG_INCDIR = $$include_replace.replace
|
2012-12-05 20:33:02 +00:00
|
|
|
QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME
|
2012-08-07 17:00:38 +00:00
|
|
|
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
2012-12-05 19:54:09 +00:00
|
|
|
QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace
|
2012-08-07 17:00:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
unix {
|
|
|
|
CONFIG += create_libtool explicitlib
|
2013-11-25 16:52:37 +00:00
|
|
|
QMAKE_LIBTOOL_LIBDIR = $$lib_replace.replace
|
2012-08-07 17:00:38 +00:00
|
|
|
QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace
|
|
|
|
}
|
|
|
|
|
|
|
|
unix|win32-g++* {
|
2013-02-04 11:43:22 +00:00
|
|
|
QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$section(VERSION, ., 0, 0) ")
|
2013-02-04 11:51:26 +00:00
|
|
|
QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$section(VERSION, ., 0, 0))
|
2013-01-25 13:58:36 +00:00
|
|
|
for(i, MODULE_DEPENDS): \
|
2013-01-25 13:54:57 +00:00
|
|
|
QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION))
|
2012-08-07 17:00:38 +00:00
|
|
|
isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \
|
|
|
|
QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
|
|
|
|
}
|
|
|
|
|
|
|
|
contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
|
|
|
|
DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
|
|
|
|
DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
|
|
|
|
DEFINES *= QT_USE_QSTRINGBUILDER
|
|
|
|
DEFINES *= QT_DEPRECATED_WARNINGS
|
|
|
|
|
2012-04-30 14:03:18 +00:00
|
|
|
win32 {
|
|
|
|
# On Windows, due to the way DLLs work, we need to export all functions,
|
|
|
|
# including the inlines
|
2012-09-12 15:51:35 +00:00
|
|
|
DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x040800
|
2012-04-30 14:03:18 +00:00
|
|
|
} else {
|
|
|
|
# On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API
|
|
|
|
DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000
|
|
|
|
}
|
|
|
|
|
2012-08-07 17:00:38 +00:00
|
|
|
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
|
|
|
|
|
|
|
|
load(qt_targets)
|
2013-01-24 22:54:08 +00:00
|
|
|
load(qt_common)
|
2012-08-07 17:00:38 +00:00
|
|
|
|
|
|
|
win32:DEFINES+=_USE_MATH_DEFINES
|
|
|
|
|