Commit e74377dc authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: fixes for borland with spaces in the path

parent d14ceb8a
...@@ -26,7 +26,7 @@ SET(CMAKE_END_TEMP_FILE "\n|") ...@@ -26,7 +26,7 @@ SET(CMAKE_END_TEMP_FILE "\n|")
# create a shared C++ library # create a shared C++ library
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE}-e<TARGET> -tWD <LINK_FLAGS> -tWR <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}" "<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE}-e<TARGET> -tWD <LINK_FLAGS> -tWR <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
"implib ${CMAKE_START_TEMP_FILE}-w <TARGET_BASE>.lib <TARGET_BASE>.dll${CMAKE_END_TEMP_FILE}" "implib -w <TARGET_BASE>.lib <TARGET_BASE>.dll"
) )
SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
...@@ -34,7 +34,7 @@ SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) ...@@ -34,7 +34,7 @@ SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
# create a C shared library # create a C shared library
SET(CMAKE_C_CREATE_SHARED_LIBRARY SET(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE}-e<TARGET> -tWD <LINK_FLAGS> -tWR <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}" "<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE}-e<TARGET> -tWD <LINK_FLAGS> -tWR <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
"implib ${CMAKE_START_TEMP_FILE}-w <TARGET_BASE>.lib <TARGET_BASE>.dll${CMAKE_END_TEMP_FILE}" "implib -w <TARGET_BASE>.lib <TARGET_BASE>.dll"
) )
# create a C shared module just copy the shared library rule # create a C shared module just copy the shared library rule
......
...@@ -768,6 +768,18 @@ cmLocalUnixMakefileGenerator::ExpandRuleVariables(std::string& s, ...@@ -768,6 +768,18 @@ cmLocalUnixMakefileGenerator::ExpandRuleVariables(std::string& s,
} }
if(targetBase) if(targetBase)
{ {
// special case for quoted paths with spaces
// if you see <TARGET_BASE>.lib then put the .lib inside
// the quotes, same for .dll
if((strlen(targetBase) > 1) && targetBase[0] == '\"')
{
std::string base = targetBase;
base[base.size()-1] = '.';
std::string baseLib = base + "lib\"";
std::string baseDll = base + "dll\"";
cmSystemTools::ReplaceString(s, "<TARGET_BASE>.lib", baseLib.c_str());
cmSystemTools::ReplaceString(s, "<TARGET_BASE>.dll", baseDll.c_str());
}
cmSystemTools::ReplaceString(s, "<TARGET_BASE>", targetBase); cmSystemTools::ReplaceString(s, "<TARGET_BASE>", targetBase);
} }
if(linkLibs) if(linkLibs)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment