diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 865ff8ca4e..81bec7c0c0 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -794,7 +794,41 @@ void VcprojGenerator::init() } MakefileGenerator::init(); - initOld(); // Currently calling old DSP code to set variables. CLEAN UP! + + // $$QMAKE.. -> $$MSVCPROJ.. ------------------------------------- + const ProStringList &incs = project->values("INCLUDEPATH"); + for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) { + QString inc = (*incit).toQString(); + if (!inc.startsWith('"') && !inc.endsWith('"')) + inc = QString("\"%1\"").arg(inc); // Quote all paths if not quoted already + project->values("MSVCPROJ_INCPATH").append("-I" + inc); + } + + QString dest = Option::fixPathToTargetOS(project->first("TARGET").toQString()) + project->first("TARGET_EXT"); + project->values("MSVCPROJ_TARGET") = ProStringList(dest); + + // DLL COPY ------------------------------------------------------ + if (project->isActiveConfig("dll") && !project->values("DLLDESTDIR").isEmpty()) { + const ProStringList &dlldirs = project->values("DLLDESTDIR"); + QString copydll(""); + ProStringList::ConstIterator dlldir; + for (dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) { + if (!copydll.isEmpty()) + copydll += " && "; + copydll += "copy \"$(TargetPath)\" \"" + *dlldir + "\""; + } + + QString deststr("Copy " + dest + " to "); + for (dlldir = dlldirs.begin(); dlldir != dlldirs.end();) { + deststr += *dlldir; + ++dlldir; + if (dlldir != dlldirs.end()) + deststr += ", "; + } + + project->values("MSVCPROJ_COPY_DLL").append(copydll); + project->values("MSVCPROJ_COPY_DLL_DESC").append(deststr); + } #if 0 // Verbose output if "-d -d"... @@ -1608,44 +1642,6 @@ void VcprojGenerator::initExtraCompilerOutputs() } } -void VcprojGenerator::initOld() -{ - // $$QMAKE.. -> $$MSVCPROJ.. ------------------------------------- - const ProStringList &incs = project->values("INCLUDEPATH"); - for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) { - QString inc = (*incit).toQString(); - if (!inc.startsWith('"') && !inc.endsWith('"')) - inc = QString("\"%1\"").arg(inc); // Quote all paths if not quoted already - project->values("MSVCPROJ_INCPATH").append("-I" + inc); - } - - QString dest = Option::fixPathToTargetOS(project->first("TARGET").toQString()) + project->first("TARGET_EXT"); - project->values("MSVCPROJ_TARGET") = ProStringList(dest); - - // DLL COPY ------------------------------------------------------ - if(project->isActiveConfig("dll") && !project->values("DLLDESTDIR").isEmpty()) { - const ProStringList &dlldirs = project->values("DLLDESTDIR"); - QString copydll(""); - ProStringList::ConstIterator dlldir; - for(dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) { - if(!copydll.isEmpty()) - copydll += " && "; - copydll += "copy \"$(TargetPath)\" \"" + *dlldir + "\""; - } - - QString deststr("Copy " + dest + " to "); - for(dlldir = dlldirs.begin(); dlldir != dlldirs.end();) { - deststr += *dlldir; - ++dlldir; - if(dlldir != dlldirs.end()) - deststr += ", "; - } - - project->values("MSVCPROJ_COPY_DLL").append(copydll); - project->values("MSVCPROJ_COPY_DLL_DESC").append(deststr); - } -} - // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index 03f8184f5d..3bf12a320b 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -85,7 +85,6 @@ protected: virtual bool openOutput(QFile &file, const QString &build) const; - void initOld(); virtual void initProject(); void initConfiguration(); void initCompilerTool();