ENH: patch from Miguel,

As it is today the generator creates linked resources to
LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH if they are not a
subdirectory of the binary dir, so that the IDE can detect the
Binaries (this was addressed previously as a result of a bug report).

Reduces code redundancy by encapsulating common behaviour for
LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH in AppendLinkedResource.

Addresses the two new variable names for these locations,
CMAKE_LIBRARY_OUTPUT_DIRECTORY and CMAKE_RUNTIME_OUTPUT_DIRECTORY respectively.

Finally, it is addressing a bug in the current code for relative paths
in these variables. If it is a relative path to the binary dir, the
IsSubdirectory call returns false and so it creates the linked
resource. The created linked resource produces an error in the Eclipse
IDE because the IDE expects it to be a full path. The patch now
addresses this by concatenating the binary dir if it is a relative
path.
This commit is contained in:
Alexander Neundorf
2009-01-11 12:18:44 -05:00
parent 3db17e22c9
commit 0d48ea6984
2 changed files with 58 additions and 34 deletions
+4
View File
@@ -107,6 +107,10 @@ private:
const std::string& name,
const std::string& path);
bool AppendOutLinkedResource(cmGeneratedFileStream& fout,
const std::string& defname,
const std::string& altdefname);
std::vector<std::string> SrcLinkedResources;
std::vector<std::string> OutLinkedResources;
std::string HomeDirectory;