mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-23 07:28:51 -06:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user