summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-30 12:31:53 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-30 12:31:53 (GMT)
commitf40406ed6bbb47e2b68e20cb7dd623a7961b090b (patch)
tree096425cfe6c1e8a6e0c96cddfb8069fe7a50da68 /Source/CPack/cmCPackGenerator.cxx
parent27c04be03a2fe47ee57a6bac339abb7f42aedfeb (diff)
downloadCMake-f40406ed6bbb47e2b68e20cb7dd623a7961b090b.zip
CMake-f40406ed6bbb47e2b68e20cb7dd623a7961b090b.tar.gz
CMake-f40406ed6bbb47e2b68e20cb7dd623a7961b090b.tar.bz2
Fix default install prefix on Haiku
Since Haiku does not have /usr (and therefore /usr/local), this commit changes the default install prefix to the equivalent directory of /boot/common. See issue #9607.
Diffstat (limited to 'Source/CPack/cmCPackGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index e2961dc..7c8405e 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -25,6 +25,10 @@
#include <cmsys/Glob.hxx>
#include <memory> // auto_ptr
+#if defined(__HAIKU__)
+#include <StorageKit.h>
+#endif
+
//----------------------------------------------------------------------
cmCPackGenerator::cmCPackGenerator()
{
@@ -1020,6 +1024,16 @@ const char* cmCPackGenerator::GetInstallPath()
this->InstallPath += this->GetOption("CPACK_PACKAGE_NAME");
this->InstallPath += "-";
this->InstallPath += this->GetOption("CPACK_PACKAGE_VERSION");
+#elif defined(__HAIKU__)
+ BPath dir;
+ if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK)
+ {
+ this->InstallPath = dir.Path();
+ }
+ else
+ {
+ this->InstallPath = "/boot/common";
+ }
#else
this->InstallPath = "/usr/local/";
#endif