2014-04-25 12:11:49 +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.
|
|
|
|
#
|
|
|
|
|
|
|
|
load(qt_build_paths)
|
|
|
|
|
|
|
|
TEMPLATE = lib
|
|
|
|
CONFIG -= qt
|
2016-05-04 14:08:37 +00:00
|
|
|
QT = # In case qt is re-added.
|
2014-04-25 12:11:49 +00:00
|
|
|
|
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.
these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
qmake -r anyway
- deps are not transitive, neither at build nor at use time
the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.
Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-30 18:53:53 +00:00
|
|
|
INCLUDEPATH += $$MODULE_INCLUDEPATH
|
|
|
|
DEFINES += $$MODULE_DEFINES
|
|
|
|
|
2016-02-03 16:00:59 +00:00
|
|
|
CONFIG -= warning_clean # Don't presume 3rd party code to be clean
|
|
|
|
load(qt_common)
|
|
|
|
|
2016-08-05 11:35:39 +00:00
|
|
|
qtConfig(debug_and_release): CONFIG += debug_and_release
|
|
|
|
qtConfig(build_all): CONFIG += build_all
|
2014-04-25 12:11:49 +00:00
|
|
|
|
|
|
|
DESTDIR = $$MODULE_BASE_OUTDIR/lib
|
|
|
|
DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
|
|
|
|
|
2016-11-04 09:34:58 +00:00
|
|
|
THE_TARGET = $$qt5LibraryTarget($$TARGET)
|
|
|
|
|
2019-08-01 05:56:59 +00:00
|
|
|
MODULE = $$replace(TARGET, ^qt, )
|
|
|
|
MODULE ~= s,-,_,
|
|
|
|
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_ext_$${MODULE}.pri
|
|
|
|
ucmodule = $$upper($$MODULE)
|
|
|
|
win32|CONFIG(static, static|shared) {
|
|
|
|
prefix = $$QMAKE_PREFIX_STATICLIB
|
|
|
|
suffix = $$QMAKE_EXTENSION_STATICLIB
|
|
|
|
} else {
|
|
|
|
prefix = $$QMAKE_PREFIX_SHLIB
|
|
|
|
suffix = $$QMAKE_EXTENSION_SHLIB
|
|
|
|
}
|
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.
these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
qmake -r anyway
- deps are not transitive, neither at build nor at use time
the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.
Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-30 18:53:53 +00:00
|
|
|
|
2019-08-01 05:56:59 +00:00
|
|
|
!build_pass {
|
2018-04-17 17:17:25 +00:00
|
|
|
CC_USES =
|
|
|
|
LD_USES =
|
|
|
|
for (use, QMAKE_USE) {
|
|
|
|
use = $$split(use, /)
|
|
|
|
name = $$take_first(use)
|
2017-11-24 18:48:33 +00:00
|
|
|
nu = $$upper($$replace(name, -, _))
|
2018-04-17 17:17:25 +00:00
|
|
|
!contains(use, linkonly): CC_USES += $$nu
|
|
|
|
!contains(use, nolink): LD_USES += $$nu
|
|
|
|
}
|
|
|
|
CC_USES = $$unique(CC_USES)
|
|
|
|
LD_USES = $$unique(LD_USES)
|
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.
these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
qmake -r anyway
- deps are not transitive, neither at build nor at use time
the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.
Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-30 18:53:53 +00:00
|
|
|
MODULE_PRI_CONT = \
|
2018-04-17 17:17:25 +00:00
|
|
|
"QMAKE_DEPENDS_$${ucmodule}_CC =$$join(CC_USES, " ", " ")" \
|
|
|
|
"QMAKE_DEPENDS_$${ucmodule}_LD =$$join(LD_USES, " ", " ")" \
|
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.
these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
qmake -r anyway
- deps are not transitive, neither at build nor at use time
the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.
Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-30 18:53:53 +00:00
|
|
|
"QMAKE_INCDIR_$${ucmodule} = $$val_escape(MODULE_INCLUDEPATH)" \
|
|
|
|
"QMAKE_DEFINES_$${ucmodule} = $$val_escape(MODULE_DEFINES)"
|
2020-08-02 18:19:49 +00:00
|
|
|
!single_android_abi:android {
|
2019-08-01 05:56:59 +00:00
|
|
|
MODULE_PRI_CONT += "QMAKE_LIBS_$${ucmodule} ="
|
2020-03-02 15:09:06 +00:00
|
|
|
} else: if(msvc|qtConfig(debug_and_release)): {
|
2017-12-01 19:13:08 +00:00
|
|
|
win32: \
|
2020-05-06 11:26:23 +00:00
|
|
|
MODULE_DEBUG_LIBS = $$DESTDIR/$$prefix$${TARGET}d.$$suffix
|
2017-12-01 19:13:08 +00:00
|
|
|
else: darwin: \
|
2020-05-06 11:26:23 +00:00
|
|
|
MODULE_DEBUG_LIBS = $$DESTDIR/$$prefix$${TARGET}_debug.$$suffix
|
2017-12-01 19:13:08 +00:00
|
|
|
else: \
|
|
|
|
error("'$$QMAKE_PLATFORM' does not do debug_and_release.")
|
2020-05-06 11:26:23 +00:00
|
|
|
MODULE_RELEASE_LIBS = $$DESTDIR/$$prefix$${TARGET}.$$suffix
|
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.
these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
qmake -r anyway
- deps are not transitive, neither at build nor at use time
the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.
Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-30 18:53:53 +00:00
|
|
|
MODULE_PRI_CONT += \
|
2017-01-18 13:46:35 +00:00
|
|
|
"QMAKE_LIBS_$${ucmodule} =" \ # Needed for the module to be recognized.
|
2020-05-06 11:26:23 +00:00
|
|
|
"QMAKE_LIBS_$${ucmodule}_DEBUG = $$val_escape(MODULE_DEBUG_LIBS)" \
|
|
|
|
"QMAKE_LIBS_$${ucmodule}_RELEASE = $$val_escape(MODULE_RELEASE_LIBS)"
|
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.
these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
qmake -r anyway
- deps are not transitive, neither at build nor at use time
the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.
Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-30 18:53:53 +00:00
|
|
|
} else {
|
2020-05-06 11:26:23 +00:00
|
|
|
MODULE_LIBS = $$DESTDIR/$$prefix$${THE_TARGET}.$$suffix
|
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.
these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
qmake -r anyway
- deps are not transitive, neither at build nor at use time
the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.
Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-30 18:53:53 +00:00
|
|
|
MODULE_PRI_CONT += \
|
2020-05-06 11:26:23 +00:00
|
|
|
"QMAKE_LIBS_$${ucmodule} = $$val_escape(MODULE_LIBS)"
|
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.
these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
qmake -r anyway
- deps are not transitive, neither at build nor at use time
the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.
Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-30 18:53:53 +00:00
|
|
|
}
|
|
|
|
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
|
2019-08-01 05:56:59 +00:00
|
|
|
} else: android {
|
|
|
|
ABI_TARGET = $$qt5LibraryTarget($$TARGET)
|
2020-05-06 11:26:23 +00:00
|
|
|
ABI_MODULE_LIBS = $$DESTDIR/$$prefix$${ABI_TARGET}.$$suffix
|
|
|
|
MODULE_PRI_CONT = "QMAKE_LIBS_$${ucmodule}_$${QT_ARCH} = $$val_escape(ABI_MODULE_LIBS)"
|
2019-08-01 05:56:59 +00:00
|
|
|
write_file($$MODULE_PRI, MODULE_PRI_CONT, append)|error()
|
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.
these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
qmake -r anyway
- deps are not transitive, neither at build nor at use time
the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.
Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-30 18:53:53 +00:00
|
|
|
}
|
|
|
|
|
2016-11-04 09:34:58 +00:00
|
|
|
TARGET = $$THE_TARGET
|
|
|
|
|
2014-05-07 14:38:06 +00:00
|
|
|
# In static builds of Qt, convenience libraries must be installed,
|
|
|
|
# as in this case they are not linked to the final library/plugin.
|
2020-09-18 08:52:32 +00:00
|
|
|
installed|if(!not_installed:qtConfig(static)) {
|
|
|
|
!isEmpty(MODULE_EXT_HEADERS) {
|
|
|
|
headers.files = $${MODULE_EXT_HEADERS}
|
|
|
|
headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET
|
|
|
|
INSTALLS += headers
|
|
|
|
} else {
|
|
|
|
!isEmpty(MODULE_EXT_HEADERS_DIR) {
|
|
|
|
headers.files = $$MODULE_EXT_HEADERS_DIR/*
|
|
|
|
headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET
|
|
|
|
INSTALLS += headers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CONFIG += qt_install_module
|
|
|
|
rpl_header_base = $$MODULE_INCLUDEPATH
|
|
|
|
rpl_lib_base = $${MODULE_LIBS}
|
|
|
|
qqt_dir = \$\$\$\$[QT_INSTALL_HEADERS]
|
|
|
|
pri_header_replace.match = $$rpl_header_base
|
|
|
|
pri_header_replace.replace = $$qqt_dir/$$TARGET
|
|
|
|
pri_header_replace.CONFIG = path
|
|
|
|
pri_header_replace.filename = qt_ext_$${MODULE}.pri
|
|
|
|
qqt_dir = \$\$\$\$[QT_INSTALL_LIBS]
|
|
|
|
pri_lib_replace.match = $$rpl_lib_base
|
|
|
|
pri_lib_replace.replace = $$qqt_dir/$$prefix$${THE_TARGET}.$$suffix
|
|
|
|
pri_lib_replace.CONFIG = path
|
|
|
|
pri_lib_replace.filename = qt_ext_$${MODULE}.pri
|
|
|
|
QMAKE_INSTALL_REPLACE += pri_header_replace pri_lib_replace
|
|
|
|
load(qt_installs)
|
|
|
|
}
|