diff options
-rw-r--r-- | mkspecs/common/msvc-desktop.conf | 3 | ||||
-rw-r--r-- | mkspecs/common/unix.conf | 1 | ||||
-rw-r--r-- | mkspecs/common/wince/qmake.conf | 3 | ||||
-rw-r--r-- | mkspecs/common/winrt_winphone/qmake.conf | 3 | ||||
-rw-r--r-- | mkspecs/cygwin-g++/qmake.conf | 4 | ||||
-rw-r--r-- | mkspecs/features/resolve_target.prf | 6 | ||||
-rw-r--r-- | mkspecs/win32-g++/qmake.conf | 2 | ||||
-rw-r--r-- | mkspecs/win32-icc/qmake.conf | 3 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 10 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 8 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.h | 1 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 15 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.h | 1 |
13 files changed, 25 insertions, 35 deletions
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index 849048dad0..a1c436388c 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -74,6 +74,9 @@ QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS QMAKE_LFLAGS_EXE = \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" QMAKE_LFLAGS_DLL = /DLL QMAKE_LFLAGS_LTCG = /LTCG +QMAKE_PREFIX_SHLIB = +QMAKE_EXTENSION_SHLIB = dll +QMAKE_PREFIX_STATICLIB = QMAKE_EXTENSION_STATICLIB = lib QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib diff --git a/mkspecs/common/unix.conf b/mkspecs/common/unix.conf index 2146b62f17..8521c85b99 100644 --- a/mkspecs/common/unix.conf +++ b/mkspecs/common/unix.conf @@ -12,5 +12,6 @@ QMAKE_YACCFLAGS_MANGLE += -p $base -b $base QMAKE_YACC_HEADER = $base.tab.h QMAKE_YACC_SOURCE = $base.tab.c QMAKE_PREFIX_SHLIB = lib +QMAKE_EXTENSION_SHLIB = so QMAKE_PREFIX_STATICLIB = lib QMAKE_EXTENSION_STATICLIB = a diff --git a/mkspecs/common/wince/qmake.conf b/mkspecs/common/wince/qmake.conf index 3eac38f6b7..224c350e2f 100644 --- a/mkspecs/common/wince/qmake.conf +++ b/mkspecs/common/wince/qmake.conf @@ -62,6 +62,9 @@ QMAKE_LFLAGS_LTCG = /LTCG QMAKE_LIBS_NETWORK = ws2.lib QMAKE_LIBS_OPENGL = QMAKE_LIBS_COMPAT = +QMAKE_PREFIX_SHLIB = +QMAKE_EXTENSION_SHLIB = dll +QMAKE_PREFIX_STATICLIB = QMAKE_EXTENSION_STATICLIB = lib QMAKE_LIBS_EGL = libEGL.lib diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf index 9ff1966284..288043da88 100644 --- a/mkspecs/common/winrt_winphone/qmake.conf +++ b/mkspecs/common/winrt_winphone/qmake.conf @@ -70,6 +70,9 @@ QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS QMAKE_LFLAGS_EXE = /MANIFEST:NO QMAKE_LFLAGS_DLL = /MANIFEST:NO /DLL QMAKE_LFLAGS_LTCG = /LTCG +QMAKE_PREFIX_SHLIB = +QMAKE_EXTENSION_SHLIB = dll +QMAKE_PREFIX_STATICLIB = QMAKE_EXTENSION_STATICLIB = lib QMAKE_LIBS += runtimeobject.lib diff --git a/mkspecs/cygwin-g++/qmake.conf b/mkspecs/cygwin-g++/qmake.conf index 95dcf8ee32..a4f64d9c66 100644 --- a/mkspecs/cygwin-g++/qmake.conf +++ b/mkspecs/cygwin-g++/qmake.conf @@ -6,7 +6,7 @@ MAKEFILE_GENERATOR = UNIX QMAKE_PLATFORM = cygwin unix posix -CONFIG += incremental +CONFIG += incremental unversioned_libname QMAKE_INCREMENTAL_STYLE = sublib QMAKE_COMPILER = gcc @@ -56,7 +56,6 @@ QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME = -Wl,-soname, QMAKE_LFLAGS_THREAD = QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_CYGWIN_SHLIB = 1 QMAKE_LIBS = QMAKE_LIBS_DYNLOAD = -ldl @@ -64,6 +63,7 @@ QMAKE_LIBS_X11 = -lXext -lX11 QMAKE_LIBS_OPENGL = -lGL QMAKE_LIBS_THREAD = -lpthread QMAKE_PREFIX_SHLIB = lib +QMAKE_EXTENSION_SHLIB = dll QMAKE_PREFIX_STATICLIB = lib QMAKE_EXTENSION_STATICLIB = a diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf index aa52e9d67e..d6460c1d9d 100644 --- a/mkspecs/features/resolve_target.prf +++ b/mkspecs/features/resolve_target.prf @@ -54,13 +54,13 @@ win32 { } else { equals(TEMPLATE, lib) { static { - QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}.a + QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}.$${QMAKE_EXTENSION_STATICLIB} } else: plugin|unversioned_libname { - QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}.so + QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}.$${QMAKE_EXTENSION_SHLIB} } else { TEMP_VERSION = $$VERSION isEmpty(TEMP_VERSION):TEMP_VERSION = 1.0.0 - QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}.so.$${TEMP_VERSION} + QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}.$${QMAKE_EXTENSION_SHLIB}.$${TEMP_VERSION} } } else { QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET} diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf index 388d697b58..92bb8f4325 100644 --- a/mkspecs/win32-g++/qmake.conf +++ b/mkspecs/win32-g++/qmake.conf @@ -87,6 +87,8 @@ QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold QMAKE_LINK_OBJECT_MAX = 10 QMAKE_LINK_OBJECT_SCRIPT = object_script +QMAKE_PREFIX_SHLIB = +QMAKE_EXTENSION_SHLIB = dll QMAKE_PREFIX_STATICLIB = lib QMAKE_EXTENSION_STATICLIB = a diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf index 65b533b3dd..3b440d143f 100644 --- a/mkspecs/win32-icc/qmake.conf +++ b/mkspecs/win32-icc/qmake.conf @@ -70,6 +70,9 @@ QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:console QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:windows QMAKE_LFLAGS_DLL = /DLL QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG +QMAKE_PREFIX_SHLIB = +QMAKE_EXTENSION_SHLIB = dll +QMAKE_PREFIX_STATICLIB = QMAKE_EXTENSION_STATICLIB = lib QMAKE_LIBS = diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 56e31922d1..1a1ba58dd1 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -45,14 +45,6 @@ QT_BEGIN_NAMESPACE void UnixMakefileGenerator::init() { - if(project->isEmpty("QMAKE_EXTENSION_SHLIB")) { - if(project->isEmpty("QMAKE_CYGWIN_SHLIB")) { - project->values("QMAKE_EXTENSION_SHLIB").append("so"); - } else { - project->values("QMAKE_EXTENSION_SHLIB").append("dll"); - } - } - ProStringList &configs = project->values("CONFIG"); if(project->isEmpty("ICON") && !project->isEmpty("RC_FILE")) project->values("ICON") = project->values("RC_FILE"); @@ -702,7 +694,6 @@ UnixMakefileGenerator::defaultInstall(const QString &t) } else if(project->first("TEMPLATE") == "app") { target = "$(QMAKE_TARGET)"; } else if(project->first("TEMPLATE") == "lib") { - if(project->isEmpty("QMAKE_CYGWIN_SHLIB")) { if (!project->isActiveConfig("staticlib") && !project->isActiveConfig("plugin") && !project->isActiveConfig("unversioned_libname")) { @@ -712,7 +703,6 @@ UnixMakefileGenerator::defaultInstall(const QString &t) links << "$(TARGET0)"; } } - } } for(int i = 0; i < targets.size(); ++i) { QString src = targets.at(i).toQString(), diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 87213a0e72..88a4494ec4 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -56,11 +56,6 @@ QString MingwMakefileGenerator::escapeDependencyPath(const QString &path) const return ret; } -QString MingwMakefileGenerator::getLibTarget() -{ - return QString("lib" + project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".a"); -} - QString MingwMakefileGenerator::getManifestFileForRcFile() const { return project->first("QMAKE_MANIFEST").toQString(); @@ -230,8 +225,7 @@ void MingwMakefileGenerator::init() QString destDir = ""; if(!project->first("DESTDIR").isEmpty()) destDir = Option::fixPathToTargetOS(project->first("DESTDIR") + Option::dir_sep, false, false); - project->values("MINGW_IMPORT_LIB").prepend(destDir + "lib" + project->first("TARGET") - + project->first("TARGET_VERSION_EXT") + ".a"); + project->values("MINGW_IMPORT_LIB").prepend(destDir + project->first("LIB_TARGET")); project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + fileVar("MINGW_IMPORT_LIB")); } diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h index e76391080c..73018319bc 100644 --- a/qmake/generators/win32/mingw_make.h +++ b/qmake/generators/win32/mingw_make.h @@ -47,7 +47,6 @@ protected: QString escapeDependencyPath(const QString &path) const; ProString escapeDependencyPath(const ProString &path) const { return MakefileGenerator::escapeDependencyPath(path); } virtual ProString fixLibFlag(const ProString &lib); - QString getLibTarget(); virtual QString getManifestFileForRcFile() const; bool writeMakefile(QTextStream &); void init(); diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 55da3d579e..07e3531420 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -318,14 +318,12 @@ void Win32MakefileGenerator::processVars() void Win32MakefileGenerator::fixTargetExt() { - if (project->isEmpty("QMAKE_EXTENSION_STATICLIB")) - project->values("QMAKE_EXTENSION_STATICLIB").append("lib"); - if (project->isEmpty("QMAKE_EXTENSION_SHLIB")) - project->values("QMAKE_EXTENSION_SHLIB").append("dll"); - if (!project->values("QMAKE_APP_FLAG").isEmpty()) { project->values("TARGET_EXT").append(".exe"); } else if (project->isActiveConfig("shared")) { + project->values("LIB_TARGET").prepend(project->first("QMAKE_PREFIX_STATICLIB") + + project->first("TARGET") + project->first("TARGET_VERSION_EXT") + + '.' + project->first("QMAKE_EXTENSION_STATICLIB")); project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + "." + project->first("QMAKE_EXTENSION_SHLIB")); project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET"); @@ -782,11 +780,6 @@ void Win32MakefileGenerator::writeRcFilePart(QTextStream &t) } } -QString Win32MakefileGenerator::getLibTarget() -{ - return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".lib"); -} - QString Win32MakefileGenerator::defaultInstall(const QString &t) { if((t != "target" && t != "dlltarget") || @@ -833,7 +826,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t) } } if(project->isActiveConfig("shared") && !project->isActiveConfig("plugin")) { - QString lib_target = getLibTarget(); + ProString lib_target = project->first("LIB_TARGET"); QString src_targ = escapeFilePath( (project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR")) + lib_target); diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h index ea763c3175..d09ec4259d 100644 --- a/qmake/generators/win32/winmakefile.h +++ b/qmake/generators/win32/winmakefile.h @@ -66,7 +66,6 @@ protected: void processVars(); void fixTargetExt(); void processRcFileVar(); - virtual QString getLibTarget(); static QString cQuoted(const QString &str); virtual QString getManifestFileForRcFile() const; }; |