summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-03-31 14:01:37 (GMT)
committerAlex Neundorf <neundorf@kde.org>2012-03-31 14:01:37 (GMT)
commitd2ed3c7dee72a41339ff95fb7aefac60778234df (patch)
tree7f81c64a7cc5bb0263dc425215034d28ee075eed /Source/cmExtraCodeBlocksGenerator.cxx
parent41d1a73e5b142349d9b61e371f36a89f7ae73ac7 (diff)
downloadCMake-d2ed3c7dee72a41339ff95fb7aefac60778234df.zip
CMake-d2ed3c7dee72a41339ff95fb7aefac60778234df.tar.gz
CMake-d2ed3c7dee72a41339ff95fb7aefac60778234df.tar.bz2
-fix #13081: support OBJECT libraries in CodeBlocks/QtCreator projects
Alex
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index ccb17f0..e0574ea 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -383,6 +383,7 @@ void cmExtraCodeBlocksGenerator
case cmTarget::STATIC_LIBRARY:
case cmTarget::SHARED_LIBRARY:
case cmTarget::MODULE_LIBRARY:
+ case cmTarget::OBJECT_LIBRARY:
{
this->AppendTarget(fout, ti->first.c_str(), &ti->second,
make.c_str(), makefile, compiler.c_str());
@@ -420,6 +421,7 @@ void cmExtraCodeBlocksGenerator
case cmTarget::STATIC_LIBRARY:
case cmTarget::SHARED_LIBRARY:
case cmTarget::MODULE_LIBRARY:
+ case cmTarget::OBJECT_LIBRARY:
case cmTarget::UTILITY: // can have sources since 2.6.3
{
const std::vector<cmSourceFile*>&sources=ti->second.GetSourceFiles();
@@ -570,7 +572,17 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
}
const char* buildType = makefile->GetDefinition("CMAKE_BUILD_TYPE");
- fout<<" <Option output=\"" << target->GetLocation(buildType)
+ const char* location = 0;
+ if ( target->GetType()==cmTarget::OBJECT_LIBRARY)
+ {
+ location = "dummy"; // hmm, what to use here ?
+ }
+ else
+ {
+ location = target->GetLocation(buildType);
+ }
+
+ fout<<" <Option output=\"" << location
<< "\" prefix_auto=\"0\" extension_auto=\"0\" />\n"
" <Option working_dir=\"" << workingDir << "\" />\n"
" <Option object_output=\"./\" />\n"
@@ -728,7 +740,8 @@ int cmExtraCodeBlocksGenerator::GetCBTargetType(cmTarget* target)
return 1;
}
}
- else if ( target->GetType()==cmTarget::STATIC_LIBRARY)
+ else if (( target->GetType()==cmTarget::STATIC_LIBRARY)
+ || (target->GetType()==cmTarget::OBJECT_LIBRARY))
{
return 2;
}