diff options
author | Brad King <brad.king@kitware.com> | 2009-09-30 12:31:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-09-30 12:31:53 (GMT) |
commit | f40406ed6bbb47e2b68e20cb7dd623a7961b090b (patch) | |
tree | 096425cfe6c1e8a6e0c96cddfb8069fe7a50da68 /Source/cmLocalGenerator.cxx | |
parent | 27c04be03a2fe47ee57a6bac339abb7f42aedfeb (diff) | |
download | CMake-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/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1cdcafc..ee55957 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -36,6 +36,10 @@ #include <assert.h> +#if defined(__HAIKU__) +#include <StorageKit.h> +#endif + cmLocalGenerator::cmLocalGenerator() { this->Makefile = 0; // moved to after set on global @@ -357,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) { |