compile source dir into cmake
This commit is contained in:
parent
f9a36a6ff9
commit
a8ccbf7c21
|
@ -65,18 +65,8 @@ int main(int ac, char** av)
|
||||||
Usage(av[0]);
|
Usage(av[0]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the cmake root directory
|
// set the cmake root directory
|
||||||
std::string root = cmSystemTools::GetProgramPath(av[0]);
|
std::string root = CMAKE_ROOT_DIR;
|
||||||
std::string::size_type slashPos = root.rfind("/");
|
|
||||||
if(slashPos != std::string::npos)
|
|
||||||
{
|
|
||||||
root = root.substr(0, slashPos);
|
|
||||||
}
|
|
||||||
cmCacheManager::GetInstance()->AddCacheEntry
|
|
||||||
("CMAKE_ROOT", root.c_str(),
|
|
||||||
"Path to CMake installation.", cmCacheManager::INTERNAL);
|
|
||||||
|
|
||||||
|
|
||||||
// Create a makefile
|
// Create a makefile
|
||||||
cmMakefile mf;
|
cmMakefile mf;
|
||||||
|
@ -138,6 +128,9 @@ int main(int ac, char** av)
|
||||||
// Read and parse the input makefile
|
// Read and parse the input makefile
|
||||||
mf.MakeStartDirectoriesCurrent();
|
mf.MakeStartDirectoriesCurrent();
|
||||||
cmCacheManager::GetInstance()->LoadCache(&mf);
|
cmCacheManager::GetInstance()->LoadCache(&mf);
|
||||||
|
cmCacheManager::GetInstance()->AddCacheEntry
|
||||||
|
("CMAKE_ROOT", root.c_str(),
|
||||||
|
"Path to CMake installation.", cmCacheManager::INTERNAL);
|
||||||
|
|
||||||
// Find our own exectuable.
|
// Find our own exectuable.
|
||||||
std::string cMakeSelf = cmSystemTools::FindProgram(av[0]);
|
std::string cMakeSelf = cmSystemTools::FindProgram(av[0]);
|
||||||
|
|
|
@ -3,7 +3,7 @@ VPATH = @srcdir@
|
||||||
|
|
||||||
CMAKE_CONFIG_DIR = @CMAKE_CONFIG_DIR@
|
CMAKE_CONFIG_DIR = @CMAKE_CONFIG_DIR@
|
||||||
CXX = @CXX@
|
CXX = @CXX@
|
||||||
CXXFLAGS = @CXXFLAGS@ -DCMAKE_HAS_AUTOCONF -I${CMAKE_CONFIG_DIR}/CMake/Source
|
CXXFLAGS = -DCMAKE_ROOT_DIR='"@CMAKE_ROOT_DIR@"' @CXXFLAGS@ -DCMAKE_HAS_AUTOCONF -I${CMAKE_CONFIG_DIR}/CMake/Source
|
||||||
|
|
||||||
.SUFFIXES: .cxx .java .class
|
.SUFFIXES: .cxx .java .class
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue