summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-04 20:44:07 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-01-04 20:44:07 (GMT)
commit3556ab9f724589c53a9d00fa7c4ee6236e5b6e2f (patch)
treeee55ad78f0edec9872d8f18d2ae14996d579726d /Source
parentf1d7a5600fab0d3cd314fd9ae059010ea6f7e5b9 (diff)
parent971692c0559ad908f7a1177fbe62d273945601db (diff)
downloadCMake-3556ab9f724589c53a9d00fa7c4ee6236e5b6e2f.zip
CMake-3556ab9f724589c53a9d00fa7c4ee6236e5b6e2f.tar.gz
CMake-3556ab9f724589c53a9d00fa7c4ee6236e5b6e2f.tar.bz2
Merge topic 'add_support_for_windres'
971692c Build enable_language command during bootstrap 960ace1 Add testing for windows resources for mingw/msys/cygwin and remove for watcom. 060d6e8 Add support for windres to cygwin. b2f308c Add support for windows resources with mingw/msys.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmBootstrapCommands.cxx2
-rw-r--r--Source/cmCommands.cxx2
-rw-r--r--Source/cmGlobalMSYSMakefileGenerator.cxx7
-rw-r--r--Source/cmGlobalMinGWMakefileGenerator.cxx7
4 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmBootstrapCommands.cxx b/Source/cmBootstrapCommands.cxx
index db01688..554f452 100644
--- a/Source/cmBootstrapCommands.cxx
+++ b/Source/cmBootstrapCommands.cxx
@@ -32,6 +32,7 @@
#include "cmCreateTestSourceList.cxx"
#include "cmDefinePropertyCommand.cxx"
#include "cmElseCommand.cxx"
+#include "cmEnableLanguageCommand.cxx"
#include "cmEnableTestingCommand.cxx"
#include "cmEndForEachCommand.cxx"
#include "cmEndFunctionCommand.cxx"
@@ -109,6 +110,7 @@ void GetBootstrapCommands(std::list<cmCommand*>& commands)
commands.push_back(new cmCreateTestSourceList);
commands.push_back(new cmDefinePropertyCommand);
commands.push_back(new cmElseCommand);
+ commands.push_back(new cmEnableLanguageCommand);
commands.push_back(new cmEnableTestingCommand);
commands.push_back(new cmEndForEachCommand);
commands.push_back(new cmEndFunctionCommand);
diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx
index 1950871..bb1e4e2 100644
--- a/Source/cmCommands.cxx
+++ b/Source/cmCommands.cxx
@@ -14,7 +14,6 @@
#include "cmAuxSourceDirectoryCommand.cxx"
#include "cmBuildNameCommand.cxx"
#include "cmElseIfCommand.cxx"
-#include "cmEnableLanguageCommand.cxx"
#include "cmEndWhileCommand.cxx"
#include "cmExportCommand.cxx"
#include "cmExportLibraryDependencies.cxx"
@@ -54,7 +53,6 @@ void GetPredefinedCommands(std::list<cmCommand*>&
commands.push_back(new cmAuxSourceDirectoryCommand);
commands.push_back(new cmBuildNameCommand);
commands.push_back(new cmElseIfCommand);
- commands.push_back(new cmEnableLanguageCommand);
commands.push_back(new cmEndWhileCommand);
commands.push_back(new cmExportCommand);
commands.push_back(new cmExportLibraryDependenciesCommand);
diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx
index d324e59..820e7e6 100644
--- a/Source/cmGlobalMSYSMakefileGenerator.cxx
+++ b/Source/cmGlobalMSYSMakefileGenerator.cxx
@@ -69,9 +69,16 @@ void cmGlobalMSYSMakefileGenerator
{
gxx = tgxx;
}
+ std::string trc = cmSystemTools::FindProgram("windres", locations);
+ std::string rc = "windres.exe";
+ if(trc.size())
+ {
+ rc = trc;
+ }
mf->AddDefinition("MSYS", "1");
mf->AddDefinition("CMAKE_GENERATOR_CC", gcc.c_str());
mf->AddDefinition("CMAKE_GENERATOR_CXX", gxx.c_str());
+ mf->AddDefinition("CMAKE_GENERATOR_RC", rc.c_str());
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
if(!mf->IsSet("CMAKE_AR") &&
diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx
index 9f9d1be..2f558dc 100644
--- a/Source/cmGlobalMinGWMakefileGenerator.cxx
+++ b/Source/cmGlobalMinGWMakefileGenerator.cxx
@@ -44,8 +44,15 @@ void cmGlobalMinGWMakefileGenerator
{
gxx = tgxx;
}
+ std::string trc = cmSystemTools::FindProgram("windres", locations);
+ std::string rc = "windres.exe";
+ if(trc.size())
+ {
+ rc = trc;
+ }
mf->AddDefinition("CMAKE_GENERATOR_CC", gcc.c_str());
mf->AddDefinition("CMAKE_GENERATOR_CXX", gxx.c_str());
+ mf->AddDefinition("CMAKE_GENERATOR_RC", rc.c_str());
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
}