View difference between Paste ID: m8Q9S6n5 and 9hpCrQRU
SHOW: | | - or go back to the newest paste.
1
 Source/cmVisualStudio10TargetGenerator.cxx | 16 ++++++++++++----
2
 1 file changed, 12 insertions(+), 4 deletions(-)
3
4
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
5
index 1e37ca5..c880ff9 100644
6
--- a/Source/cmVisualStudio10TargetGenerator.cxx
7
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
8
@@ -871,10 +871,18 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
9
         si = this->GeneratorTarget->ExternalObjects.begin();
10
       si != this->GeneratorTarget->ExternalObjects.end(); ++si)
11
     {
12
-    // If an object file is generated in this target, then vs10 will use
13
-    // it in the build, and we have to list it as None instead of Object.
14
-    std::vector<cmSourceFile*> const* d = this->Target->GetSourceDepends(*si);
15
-    this->WriteSource((d && !d->empty())? "None":"Object", *si);
16-
+        // if we mark an object file as external, you better fucking set it as Object !
16+
+        // if we mark an object file as external, set it as Object
17
+        if ((*si)->GetPropertyAsBool("EXTERNAL_OBJECT"))
18
+        {
19
+            this->WriteSource("Object", *si);
20
+        }
21
+        else
22
+        {
23
+            // If an object file is generated in this target, then vs10 will use
24
+            // it in the build, and we have to list it as None instead of Object.
25
+            std::vector<cmSourceFile*> const* d = this->Target->GetSourceDepends(*si);
26
+            this->WriteSource((d && !d->empty())? "None":"Object", *si);
27
+        }
28
     }
29
 
30
   this->WriteSources("None", this->GeneratorTarget->ExtraSources);