summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorAdrien Destugues <pulkomandy@pulkomandy.tk>2013-10-05 14:31:36 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-08 13:55:38 (GMT)
commit1dc61f814277744581bb36ae40c91893c1bef851 (patch)
tree47b16a4ddc6daf294f6556e0af2dbb69f1d75e28 /Source/CPack
parent7ebc1cb2ff3f79724711247be1edade38a3ef0f4 (diff)
downloadCMake-1dc61f814277744581bb36ae40c91893c1bef851.zip
CMake-1dc61f814277744581bb36ae40c91893c1bef851.tar.gz
CMake-1dc61f814277744581bb36ae40c91893c1bef851.tar.bz2
Haiku: Remove use of B_COMMON_DIRECTORY
The common directory was removed in Haiku. Applications are now installed in the system directory. Applied-by: Rolf Eike Beer <eike@sf-mail.de>
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx11
1 files changed, 6 insertions, 5 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/";