mirror of
https://github.com/reactos/CMake.git
synced 2024-11-26 21:10:29 +00:00
ERR: Fix visual studio install
This commit is contained in:
parent
f9b43b9212
commit
ed0999c9d1
@ -249,6 +249,8 @@ bool cmFileCommand::HandleInstallCommand(
|
||||
std::string destination = "";
|
||||
std::string stype = "FILES";
|
||||
const char* build_type = m_Makefile->GetDefinition("BUILD_TYPE");
|
||||
const char* debug_postfix
|
||||
= m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX");
|
||||
const char* destdir = cmSystemTools::GetEnv("DESTDIR");
|
||||
|
||||
std::string extra_dir = "";
|
||||
@ -451,6 +453,10 @@ bool cmFileCommand::HandleInstallCommand(
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
if ( debug )
|
||||
{
|
||||
fname = fnamewe + debug_postfix + ext;
|
||||
}
|
||||
{
|
||||
// Handle shared library versioning
|
||||
const char* lib_version = 0;
|
||||
@ -506,11 +512,15 @@ bool cmFileCommand::HandleInstallCommand(
|
||||
}
|
||||
}
|
||||
cmOStringStream str;
|
||||
str << cmSystemTools::GetFilenamePath(ctarget)
|
||||
<< "/" << extra_dir << "/"
|
||||
<< fname;
|
||||
str << cmSystemTools::GetFilenamePath(ctarget) << "/";
|
||||
if ( extra_dir.size() > 0 )
|
||||
{
|
||||
str << extra_dir << "/";
|
||||
}
|
||||
str << fname;
|
||||
ctarget = str.str();
|
||||
}
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
if ( extra_dir.size() > 0 )
|
||||
{
|
||||
|
@ -482,14 +482,18 @@ int cmGlobalGenerator::TryCompile(const char *, const char *bindir,
|
||||
}
|
||||
int retVal;
|
||||
int timeout = cmGlobalGenerator::s_TryCompileTimeout;
|
||||
bool hideconsole = cmSystemTools::GetRunCommandHideConsole();
|
||||
cmSystemTools::SetRunCommandHideConsole(true);
|
||||
if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), output,
|
||||
&retVal, 0, false, timeout))
|
||||
{
|
||||
cmSystemTools::SetRunCommandHideConsole(hideconsole);
|
||||
cmSystemTools::Error("Generator: execution of make failed.");
|
||||
// return to the original directory
|
||||
cmSystemTools::ChangeDirectory(cwd.c_str());
|
||||
return 1;
|
||||
}
|
||||
cmSystemTools::SetRunCommandHideConsole(hideconsole);
|
||||
|
||||
// The SGI MipsPro 7.3 compiler does not return an error code when
|
||||
// the source has a #error in it! This is a work-around for such
|
||||
|
@ -17,11 +17,16 @@ IF(CMAKE_GENERATOR MATCHES "^Visual Studio")
|
||||
SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${build_type})
|
||||
ENDIF(MAKEPROGRAM MATCHES "- ${build_type}")
|
||||
ENDFOREACH(build_type)
|
||||
IF(NOT EXTRA_INSTALL_FLAGS)
|
||||
IF(NOT ${EXTRA_INSTALL_FLAGS})
|
||||
IF(BUILD_TYPE)
|
||||
SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${BUILD_TYPE})
|
||||
ENDIF(BUILD_TYPE)
|
||||
ENDIF(NOT EXTRA_INSTALL_FLAGS)
|
||||
ENDIF(NOT ${EXTRA_INSTALL_FLAGS})
|
||||
IF(NOT DEFINED EXTRA_INSTALL_FLAGS)
|
||||
IF(NOT "$ENV{SIMPLE_INSTALL_BUILD_TYPE}" MATCHES "^$")
|
||||
SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=$ENV{SIMPLE_INSTALL_BUILD_TYPE})
|
||||
ENDIF(NOT "$ENV{SIMPLE_INSTALL_BUILD_TYPE}" MATCHES "^$")
|
||||
ENDIF(NOT DEFINED EXTRA_INSTALL_FLAGS)
|
||||
ENDIF(CMAKE_GENERATOR MATCHES "^Visual Studio")
|
||||
|
||||
MESSAGE("Extra install: ${EXTRA_INSTALL_FLAGS}")
|
||||
@ -71,7 +76,7 @@ ELSE(STAGE2)
|
||||
|
||||
ADD_DEPENDENCIES(SimpleInstall test3)
|
||||
ADD_DEPENDENCIES(test2 test3)
|
||||
ADD_DEPENDENCIES(test4 test3)
|
||||
ADD_DEPENDENCIES(test4 test2)
|
||||
|
||||
INSTALL_TARGETS(/bin SimpleInstall)
|
||||
INSTALL_TARGETS(/lib test1 test2 test3 test4)
|
||||
|
@ -17,11 +17,16 @@ IF(CMAKE_GENERATOR MATCHES "^Visual Studio")
|
||||
SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${build_type})
|
||||
ENDIF(MAKEPROGRAM MATCHES "- ${build_type}")
|
||||
ENDFOREACH(build_type)
|
||||
IF(NOT EXTRA_INSTALL_FLAGS)
|
||||
IF(NOT ${EXTRA_INSTALL_FLAGS})
|
||||
IF(BUILD_TYPE)
|
||||
SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${BUILD_TYPE})
|
||||
ENDIF(BUILD_TYPE)
|
||||
ENDIF(NOT EXTRA_INSTALL_FLAGS)
|
||||
ENDIF(NOT ${EXTRA_INSTALL_FLAGS})
|
||||
IF(NOT DEFINED EXTRA_INSTALL_FLAGS)
|
||||
IF(NOT "$ENV{SIMPLE_INSTALL_BUILD_TYPE}" MATCHES "^$")
|
||||
SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=$ENV{SIMPLE_INSTALL_BUILD_TYPE})
|
||||
ENDIF(NOT "$ENV{SIMPLE_INSTALL_BUILD_TYPE}" MATCHES "^$")
|
||||
ENDIF(NOT DEFINED EXTRA_INSTALL_FLAGS)
|
||||
ENDIF(CMAKE_GENERATOR MATCHES "^Visual Studio")
|
||||
|
||||
MESSAGE("Extra install: ${EXTRA_INSTALL_FLAGS}")
|
||||
@ -71,7 +76,7 @@ ELSE(STAGE2)
|
||||
|
||||
ADD_DEPENDENCIES(SimpleInstall test3)
|
||||
ADD_DEPENDENCIES(test2 test3)
|
||||
ADD_DEPENDENCIES(test4 test3)
|
||||
ADD_DEPENDENCIES(test4 test2)
|
||||
|
||||
INSTALL_TARGETS(/bin SimpleInstall)
|
||||
INSTALL_TARGETS(/lib test1 test2 test3 test4)
|
||||
|
Loading…
Reference in New Issue
Block a user