mirror of
https://github.com/reactos/CMake.git
synced 2024-12-01 15:30:40 +00:00
ENH: Added undocumented cmake_symlink_library to help with building versioned shared libraries.
This commit is contained in:
parent
587370e1e2
commit
f764e1fcb2
@ -715,7 +715,33 @@ int cmake::CMakeCommand(std::vector<std::string>& args)
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Internal CMake shared library support.
|
||||
else if (args[1] == "cmake_symlink_library" && args.size() == 5)
|
||||
{
|
||||
int result = 0;
|
||||
std::string realName = args[2];
|
||||
std::string soName = args[3];
|
||||
std::string name = args[4];
|
||||
if(soName != realName)
|
||||
{
|
||||
std::string fname = cmSystemTools::GetFilenameName(realName);
|
||||
if(!cmSystemTools::CreateSymlink(fname.c_str(), soName.c_str()))
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
}
|
||||
if(name != soName)
|
||||
{
|
||||
std::string fname = cmSystemTools::GetFilenameName(soName);
|
||||
if(!cmSystemTools::CreateSymlink(fname.c_str(), name.c_str()))
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
// Write registry value
|
||||
|
Loading…
Reference in New Issue
Block a user