summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-05-15 17:14:13 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-05-15 17:14:13 (GMT)
commita12448c19ba732eaf9b5b2907bf25318f9f97ce8 (patch)
tree6087e4d011217b172671906bcadb248ffe396b36
parent60a8a2f6aaef970aada3474909d122dd4e5ade58 (diff)
downloadCMake-a12448c19ba732eaf9b5b2907bf25318f9f97ce8.zip
CMake-a12448c19ba732eaf9b5b2907bf25318f9f97ce8.tar.gz
CMake-a12448c19ba732eaf9b5b2907bf25318f9f97ce8.tar.bz2
added output directory support
-rw-r--r--Source/DLLHeader.dsptemplate5
-rw-r--r--Source/EXEHeader.dsptemplate6
-rw-r--r--Source/EXEWinHeader.dsptemplate6
-rw-r--r--Source/cmDSPMakefile.cxx16
-rw-r--r--Source/cmDSPWriter.cxx16
-rw-r--r--Source/staticLibHeader.dsptemplate6
6 files changed, 44 insertions, 11 deletions
diff --git a/Source/DLLHeader.dsptemplate b/Source/DLLHeader.dsptemplate
index 23387c1..0c88beb 100644
--- a/Source/DLLHeader.dsptemplate
+++ b/Source/DLLHeader.dsptemplate
@@ -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"
+
diff --git a/Source/EXEHeader.dsptemplate b/Source/EXEHeader.dsptemplate
index dd23f8b..12adbca 100644
--- a/Source/EXEHeader.dsptemplate
+++ b/Source/EXEHeader.dsptemplate
@@ -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
diff --git a/Source/EXEWinHeader.dsptemplate b/Source/EXEWinHeader.dsptemplate
index b226cb5..b7bdfb5 100644
--- a/Source/EXEWinHeader.dsptemplate
+++ b/Source/EXEWinHeader.dsptemplate
@@ -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
diff --git a/Source/cmDSPMakefile.cxx b/Source/cmDSPMakefile.cxx
index 0055276..e3600ef 100644
--- a/Source/cmDSPMakefile.cxx
+++ b/Source/cmDSPMakefile.cxx
@@ -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());
diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx
index 0055276..e3600ef 100644
--- a/Source/cmDSPWriter.cxx
+++ b/Source/cmDSPWriter.cxx
@@ -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());
diff --git a/Source/staticLibHeader.dsptemplate b/Source/staticLibHeader.dsptemplate
index 20610ce..f6e153b 100644
--- a/Source/staticLibHeader.dsptemplate
+++ b/Source/staticLibHeader.dsptemplate
@@ -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 ""