summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-09 14:23:04 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-09 14:23:04 (GMT)
commite81b6742f72869a25e59230948a34a02f504046d (patch)
tree0587c80c7012a02ebec9ae43702f6065126fa742 /Source
parent7ed7d75a0418a1972dbb508e275d05c3ff5a78a6 (diff)
parent54ef2bea379ca47d961c1bb0fd0ccb026b482810 (diff)
downloadCMake-e81b6742f72869a25e59230948a34a02f504046d.zip
CMake-e81b6742f72869a25e59230948a34a02f504046d.tar.gz
CMake-e81b6742f72869a25e59230948a34a02f504046d.tar.bz2
Merge topic 'haiku-updates'
54ef2be Haiku: Include files cleanup in cmCTest 38d5555 Haiku: Remove outdated preprocessor checks 1dc61f8 Haiku: Remove use of B_COMMON_DIRECTORY 7ebc1cb Haiku: Several fixes to platform module
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx11
-rw-r--r--Source/cmCTest.cxx6
-rw-r--r--Source/cmExportCommand.cxx14
-rw-r--r--Source/cmFindPackageCommand.cxx18
-rw-r--r--Source/cmLocalGenerator.cxx12
5 files changed, 33 insertions, 28 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 3c685bd..63a7596 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -26,7 +26,8 @@
#include <algorithm>
#if defined(__HAIKU__)
-#include <StorageKit.h>
+#include <FindDirectory.h>
+#include <StorageDefs.h>
#endif
//----------------------------------------------------------------------
@@ -1263,14 +1264,14 @@ const char* cmCPackGenerator::GetInstallPath()
this->InstallPath += "-";
this->InstallPath += this->GetOption("CPACK_PACKAGE_VERSION");
#elif defined(__HAIKU__)
- BPath dir;
- if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK)
+ char dir[B_PATH_NAME_LENGTH];
+ if (find_directory(B_SYSTEM_DIRECTORY, -1, false, dir, sizeof(dir)) == B_OK)
{
- this->InstallPath = dir.Path();
+ this->InstallPath = dir;
}
else
{
- this->InstallPath = "/boot/common";
+ this->InstallPath = "/boot/system";
}
#else
this->InstallPath = "/usr/local/";
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index feae61a..98f19cc 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -53,14 +53,10 @@
#include <cm_zlib.h>
#include <cmsys/Base64.h>
-#if defined(__BEOS__)
+#if defined(__BEOS__) || defined(__HAIKU__)
#include <be/kernel/OS.h> /* disable_debugger() API. */
#endif
-#if defined(__HAIKU__)
-#include <os/kernel/OS.h> /* disable_debugger() API. */
-#endif
-
#define DEBUGOUT std::cout << __LINE__ << " "; std::cout
#define DEBUGERR std::cerr << __LINE__ << " "; std::cerr
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index 837bb39..422b038 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -20,7 +20,8 @@
#include "cmExportBuildFileGenerator.h"
#if defined(__HAIKU__)
-#include <StorageKit.h>
+#include <FindDirectory.h>
+#include <StorageDefs.h>
#endif
cmExportCommand::cmExportCommand()
@@ -319,14 +320,15 @@ void cmExportCommand::StorePackageRegistryDir(std::string const& package,
const char* hash)
{
#if defined(__HAIKU__)
- BPath dir;
- if (find_directory(B_USER_SETTINGS_DIRECTORY, &dir) != B_OK)
+ char dir[B_PATH_NAME_LENGTH];
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, dir, sizeof(dir)) !=
+ B_OK)
{
return;
}
- dir.Append("cmake/packages");
- dir.Append(package.c_str());
- std::string fname = dir.Path();
+ std::string fname = dir;
+ fname += "/cmake/packages/";
+ fname += package;
#else
const char* home = cmSystemTools::GetEnv("HOME");
if(!home)
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index aa3a73d..1d6530f 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -19,7 +19,9 @@
#endif
#if defined(__HAIKU__)
-#include <StorageKit.h>
+#include <string.h>
+#include <FindDirectory.h>
+#include <StorageDefs.h>
#endif
void cmFindPackageNeedBackwardsCompatibility(const std::string& variable,
@@ -1584,12 +1586,14 @@ void cmFindPackageCommand::AddPrefixesUserRegistry()
#if defined(_WIN32) && !defined(__CYGWIN__)
this->LoadPackageRegistryWinUser();
#elif defined(__HAIKU__)
- BPath dir;
- if (find_directory(B_USER_SETTINGS_DIRECTORY, &dir) == B_OK)
- {
- dir.Append("cmake/packages");
- dir.Append(this->Name.c_str());
- this->LoadPackageRegistryDir(dir.Path());
+ char dir[B_PATH_NAME_LENGTH];
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, dir, sizeof(dir)) ==
+ B_OK)
+ {
+ std::string fname = dir;
+ fname += "/cmake/packages/";
+ fname += Name;
+ this->LoadPackageRegistryDir(fname);
}
#else
if(const char* home = cmSystemTools::GetEnv("HOME"))
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index b4cb5bd..9174e26 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -37,7 +37,8 @@
#include <assert.h>
#if defined(__HAIKU__)
-#include <StorageKit.h>
+#include <FindDirectory.h>
+#include <StorageDefs.h>
#endif
cmLocalGenerator::cmLocalGenerator()
@@ -349,16 +350,17 @@ void cmLocalGenerator::GenerateInstallRules()
prefix = prefix_win32.c_str();
}
#elif defined(__HAIKU__)
+ char dir[B_PATH_NAME_LENGTH];
if (!prefix)
{
- BPath dir;
- if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK)
+ if (find_directory(B_SYSTEM_DIRECTORY, -1, false, dir, sizeof(dir))
+ == B_OK)
{
- prefix = dir.Path();
+ prefix = dir;
}
else
{
- prefix = "/boot/common";
+ prefix = "/boot/system";
}
}
#else