added output directory support

This commit is contained in:
Ken Martin 2001-05-15 13:14:13 -04:00
parent 60a8a2f6aa
commit a12448c19b
6 changed files with 44 additions and 11 deletions

View File

@ -52,7 +52,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Output_Dir "OUTPUT_LIBRARY_PATHRelease"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
@ -79,7 +79,7 @@ LINK32=link.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Output_Dir "OUTPUT_LIBRARY_PATHDebug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
@ -104,3 +104,4 @@ LINK32=link.exe
# Name "OUTPUT_LIBNAME - Win32 Release"
# Name "OUTPUT_LIBNAME - Win32 Debug"

View File

@ -51,7 +51,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Output_Dir "OUTPUT_EXECUTABLE_PATHRelease"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GR /GX /Zm1000 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
@ -76,7 +76,7 @@ CM_MULTILINE_LIBRARIES
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Output_Dir "OUTPUT_EXECUTABLE_PATHDebug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /W3 /GR /Zm1000 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
@ -102,7 +102,7 @@ CM_MULTILINE_LIBRARIES
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseMinSize"
# PROP Output_Dir "OUTPUT_EXECUTABLE_PATHReleaseMinSize"
# PROP Intermediate_Dir "ReleaseMinSize"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GR /GX /Zm1000 /O1 /Gs /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c

View File

@ -51,7 +51,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Output_Dir "OUTPUT_EXECUTABLE_PATHRelease"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GR /GX /Zm1000 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
@ -78,7 +78,7 @@ CM_MULTILINE_LIBRARIES
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Output_Dir "OUTPUT_EXECUTABLE_PATHDebug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /W3 /GR /Zm1000 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /GZ /c
@ -100,7 +100,7 @@ CM_MULTILINE_LIBRARIES
!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release MinSize"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseMinSize"
# PROP BASE Output_Dir "OUTPUT_EXECUTABLE_PATHReleaseMinSize"
# PROP BASE Intermediate_Dir "ReleaseMinSize"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0

View File

@ -446,6 +446,18 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
std::string libMultiLineDebugOptions;
std::string libMultiLineOptimizedOptions;
// suppoirt override in output directory
std::string libPath = "";
if (m_Makefile->GetDefinition("LIBRARY_OUTPUT_PATH"))
{
libPath = m_Makefile->GetDefinition("LIBRARY_OUTPUT_PATH");
}
std::string exePath = "";
if (m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"))
{
exePath = m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH");
}
std::vector<std::string>::iterator i;
std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories();
for(i = libdirs.begin(); i != libdirs.end(); ++i)
@ -540,6 +552,10 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES",
m_IncludeOptions.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME",libName);
cmSystemTools::ReplaceString(line, "OUTPUT_LIBRARY_PATH",
exePath.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_EXECUTABLE_PATH",
exePath.c_str());
cmSystemTools::ReplaceString(line,
"EXTRA_DEFINES",
m_Makefile->GetDefineFlags());

View File

@ -446,6 +446,18 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
std::string libMultiLineDebugOptions;
std::string libMultiLineOptimizedOptions;
// suppoirt override in output directory
std::string libPath = "";
if (m_Makefile->GetDefinition("LIBRARY_OUTPUT_PATH"))
{
libPath = m_Makefile->GetDefinition("LIBRARY_OUTPUT_PATH");
}
std::string exePath = "";
if (m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"))
{
exePath = m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH");
}
std::vector<std::string>::iterator i;
std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories();
for(i = libdirs.begin(); i != libdirs.end(); ++i)
@ -540,6 +552,10 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES",
m_IncludeOptions.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME",libName);
cmSystemTools::ReplaceString(line, "OUTPUT_LIBRARY_PATH",
exePath.c_str());
cmSystemTools::ReplaceString(line, "OUTPUT_EXECUTABLE_PATH",
exePath.c_str());
cmSystemTools::ReplaceString(line,
"EXTRA_DEFINES",
m_Makefile->GetDefineFlags());

View File

@ -48,7 +48,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Output_Dir "OUTPUT_LIBRARY_PATHRelease"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
@ -71,7 +71,7 @@ LIB32=link.exe -lib
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Output_Dir "OUTPUT_LIBRARY_PATHDebug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
@ -92,7 +92,7 @@ LIB32=link.exe -lib
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseMinSize"
# PROP Output_Dir "OUTPUT_LIBRARY_PATHReleaseMinSize"
# PROP Intermediate_Dir "ReleaseMinSize"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""