diff options
author | Brad King <brad.king@kitware.com> | 2007-03-22 13:45:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-03-22 13:45:25 (GMT) |
commit | 5a32aa5919bd9dab272748c0e0ea12fbcd36436b (patch) | |
tree | b4b0d2c70b896a8c95c91c88112ec2b3bb9d987d /Source/cmMakefileExecutableTargetGenerator.cxx | |
parent | 187816c9371e49769c02481ea46491b2d7e22d66 (diff) | |
download | CMake-5a32aa5919bd9dab272748c0e0ea12fbcd36436b.zip CMake-5a32aa5919bd9dab272748c0e0ea12fbcd36436b.tar.gz CMake-5a32aa5919bd9dab272748c0e0ea12fbcd36436b.tar.bz2 |
ENH: Added target property ENABLE_EXPORTS for executable targets. It enables the executables for linking by loadable modules that import symbols from the executable. This finishes the executable import library support mentioned in bug #4210.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 2414458..48aa284 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -347,6 +347,19 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string linkRule = this->Makefile->GetRequiredDefinition(linkRuleVar.c_str()); cmSystemTools::ExpandListArgument(linkRule, commands1); + if(this->Target->GetPropertyAsBool("ENABLE_EXPORTS")) + { + // If a separate rule for creating an import library is specified + // add it now. + std::string implibRuleVar = "CMAKE_"; + implibRuleVar += linkLanguage; + implibRuleVar += "_CREATE_IMPORT_LIBRARY"; + if(const char* rule = + this->Makefile->GetDefinition(implibRuleVar.c_str())) + { + cmSystemTools::ExpandListArgument(rule, commands1); + } + } this->LocalGenerator->CreateCDCommand (commands1, this->Makefile->GetStartOutputDirectory(), |