BUG: Moved definition of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR to be as soon as their information is known.
This commit is contained in:
parent
354992c522
commit
f84972610e
|
@ -388,11 +388,7 @@ std::string cmMakefile::GetParentListFileName(const char *currentFileName)
|
||||||
|
|
||||||
void cmMakefile::ExpandVariables()
|
void cmMakefile::ExpandVariables()
|
||||||
{
|
{
|
||||||
// make sure binary and source dir are defined
|
// Now expand varibles in the include and link strings
|
||||||
this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory());
|
|
||||||
this->AddDefinition("CMAKE_SOURCE_DIR", this->GetHomeDirectory());
|
|
||||||
|
|
||||||
// Now expand varibles in the include and link strings
|
|
||||||
std::vector<std::string>::iterator j, begin, end;
|
std::vector<std::string>::iterator j, begin, end;
|
||||||
begin = m_IncludeDirectories.begin();
|
begin = m_IncludeDirectories.begin();
|
||||||
end = m_IncludeDirectories.end();
|
end = m_IncludeDirectories.end();
|
||||||
|
|
|
@ -173,6 +173,7 @@ public:
|
||||||
{
|
{
|
||||||
m_cmHomeDirectory = dir;
|
m_cmHomeDirectory = dir;
|
||||||
cmSystemTools::ConvertToUnixSlashes(m_cmHomeDirectory);
|
cmSystemTools::ConvertToUnixSlashes(m_cmHomeDirectory);
|
||||||
|
this->AddDefinition("CMAKE_SOURCE_DIR", this->GetHomeDirectory());
|
||||||
}
|
}
|
||||||
const char* GetHomeDirectory()
|
const char* GetHomeDirectory()
|
||||||
{
|
{
|
||||||
|
@ -182,6 +183,7 @@ public:
|
||||||
{
|
{
|
||||||
m_HomeOutputDirectory = lib;
|
m_HomeOutputDirectory = lib;
|
||||||
cmSystemTools::ConvertToUnixSlashes(m_HomeOutputDirectory);
|
cmSystemTools::ConvertToUnixSlashes(m_HomeOutputDirectory);
|
||||||
|
this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory());
|
||||||
}
|
}
|
||||||
const char* GetHomeOutputDirectory()
|
const char* GetHomeOutputDirectory()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue