Make sure .pc, .prl and .la files are created for header_only modules
Those modules are TEMPLATE=aux, so they weren't triggering the file creation here. To make this work properly we have to: - check for TEMPLATE aux in the right places - add a dummy target to INSTALLS to actually trigger the creation - initialize PRL_TARGET for aux templates Fixes: QTBUG-75901 Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Idce141629dd34287808bfffd159f92ac28c6c8b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
c64f8ca232
commit
4da47d0fba
@ -82,6 +82,11 @@ header_module {
|
|||||||
CONFIG += force_qt # Needed for the headers_clean tests.
|
CONFIG += force_qt # Needed for the headers_clean tests.
|
||||||
!lib_bundle: \
|
!lib_bundle: \
|
||||||
CONFIG += qt_no_install_library
|
CONFIG += qt_no_install_library
|
||||||
|
|
||||||
|
# Allow creation of .prl, .la and .pc files.
|
||||||
|
target.path = $$[QT_INSTALL_LIBS]
|
||||||
|
target.CONFIG += dummy_install
|
||||||
|
INSTALLS += target
|
||||||
} else {
|
} else {
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
}
|
}
|
||||||
|
@ -1120,7 +1120,8 @@ MakefileGenerator::writePrlFile()
|
|||||||
&& project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()
|
&& project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()
|
||||||
&& project->isActiveConfig("create_prl")
|
&& project->isActiveConfig("create_prl")
|
||||||
&& (project->first("TEMPLATE") == "lib"
|
&& (project->first("TEMPLATE") == "lib"
|
||||||
|| project->first("TEMPLATE") == "vclib")
|
|| project->first("TEMPLATE") == "vclib"
|
||||||
|
|| project->first("TEMPLATE") == "aux")
|
||||||
&& (!project->isActiveConfig("plugin") || project->isActiveConfig("static"))) { //write prl file
|
&& (!project->isActiveConfig("plugin") || project->isActiveConfig("static"))) { //write prl file
|
||||||
QString local_prl = prlFileName();
|
QString local_prl = prlFileName();
|
||||||
QString prl = fileFixify(local_prl);
|
QString prl = fileFixify(local_prl);
|
||||||
|
@ -726,7 +726,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(project->first("TEMPLATE") == "lib") {
|
if (isAux || project->first("TEMPLATE") == "lib") {
|
||||||
QStringList types;
|
QStringList types;
|
||||||
types << "prl" << "libtool" << "pkgconfig";
|
types << "prl" << "libtool" << "pkgconfig";
|
||||||
for(int i = 0; i < types.size(); ++i) {
|
for(int i = 0; i < types.size(); ++i) {
|
||||||
|
@ -48,12 +48,15 @@ void
|
|||||||
UnixMakefileGenerator::writePrlFile(QTextStream &t)
|
UnixMakefileGenerator::writePrlFile(QTextStream &t)
|
||||||
{
|
{
|
||||||
MakefileGenerator::writePrlFile(t);
|
MakefileGenerator::writePrlFile(t);
|
||||||
|
const ProString tmplt = project->first("TEMPLATE");
|
||||||
|
if (tmplt != "lib" && tmplt != "aux")
|
||||||
|
return;
|
||||||
// libtool support
|
// libtool support
|
||||||
if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib") { //write .la
|
if (project->isActiveConfig("create_libtool")) {
|
||||||
writeLibtoolFile();
|
writeLibtoolFile();
|
||||||
}
|
}
|
||||||
// pkg-config support
|
// pkg-config support
|
||||||
if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib")
|
if (project->isActiveConfig("create_pc"))
|
||||||
writePkgConfigFile();
|
writePkgConfigFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1199,7 +1202,8 @@ void UnixMakefileGenerator::init2()
|
|||||||
project->values("QMAKE_FRAMEWORK_VERSION").append(project->first("VER_MAJ"));
|
project->values("QMAKE_FRAMEWORK_VERSION").append(project->first("VER_MAJ"));
|
||||||
|
|
||||||
if (project->first("TEMPLATE") == "aux") {
|
if (project->first("TEMPLATE") == "aux") {
|
||||||
// nothing
|
project->values("PRL_TARGET") =
|
||||||
|
project->values("TARGET").first().prepend(project->first("QMAKE_PREFIX_STATICLIB"));
|
||||||
} else if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
|
} else if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
|
||||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||||
ProString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
|
ProString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
|
||||||
|
Loading…
Reference in New Issue
Block a user