summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-10-01 21:21:28 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-10-01 21:21:28 (GMT)
commitf9687e328f7ea64ea6384aae11af36fdd3a12643 (patch)
tree91e2555b44011705d3188f11d7b7598f29c0ba7b /Source/cmLocalGenerator.cxx
parent3c7354c1cd9fb081df8b3f4faef5160ea83f584f (diff)
downloadCMake-f9687e328f7ea64ea6384aae11af36fdd3a12643.zip
CMake-f9687e328f7ea64ea6384aae11af36fdd3a12643.tar.gz
CMake-f9687e328f7ea64ea6384aae11af36fdd3a12643.tar.bz2
Merge in changes to CMake-2-8 RC 2
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx51
1 files changed, 34 insertions, 17 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 7589520..ee55957 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1,19 +1,14 @@
-/*=========================================================================
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
- Program: CMake - Cross-Platform Makefile Generator
- Module: $RCSfile$
- Language: C++
- Date: $Date$
- Version: $Revision$
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
- Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
- See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the above copyright notices for more information.
-
-=========================================================================*/
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
#include "cmLocalGenerator.h"
#include "cmComputeLinkInformation.h"
@@ -41,6 +36,10 @@
#include <assert.h>
+#if defined(__HAIKU__)
+#include <StorageKit.h>
+#endif
+
cmLocalGenerator::cmLocalGenerator()
{
this->Makefile = 0; // moved to after set on global
@@ -362,6 +361,19 @@ void cmLocalGenerator::GenerateInstallRules()
}
prefix = prefix_win32.c_str();
}
+#elif defined(__HAIKU__)
+ if (!prefix)
+ {
+ BPath dir;
+ if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK)
+ {
+ prefix = dir.Path();
+ }
+ else
+ {
+ prefix = "/boot/common";
+ }
+ }
#else
if (!prefix)
{
@@ -1837,12 +1849,17 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName,
// found is part of the inName
if(cmSystemTools::FileIsFullPath(inName))
{
- std::string tLocation = target->GetLocation(config);
- tLocation = cmSystemTools::GetFilenamePath(tLocation);
+ std::string tLocation;
+ if(target->GetType() >= cmTarget::EXECUTABLE &&
+ target->GetType() <= cmTarget::MODULE_LIBRARY)
+ {
+ tLocation = target->GetLocation(config);
+ tLocation = cmSystemTools::GetFilenamePath(tLocation);
+ tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
+ }
std::string depLocation = cmSystemTools::GetFilenamePath(
std::string(inName));
depLocation = cmSystemTools::CollapseFullPath(depLocation.c_str());
- tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
if(depLocation != tLocation)
{
// it is a full path to a depend that has the same name