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:
parent
27c04be03a
commit
f40406ed6b
@ -19,3 +19,8 @@ LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin)
|
|||||||
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)
|
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)
|
||||||
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty)
|
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty)
|
||||||
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/develop/lib/x86)
|
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/develop/lib/x86)
|
||||||
|
|
||||||
|
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
SET(CMAKE_INSTALL_PREFIX "/boot/common" CACHE PATH
|
||||||
|
"Install path prefix, prepended onto install directories." FORCE)
|
||||||
|
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
@ -25,6 +25,10 @@
|
|||||||
#include <cmsys/Glob.hxx>
|
#include <cmsys/Glob.hxx>
|
||||||
#include <memory> // auto_ptr
|
#include <memory> // auto_ptr
|
||||||
|
|
||||||
|
#if defined(__HAIKU__)
|
||||||
|
#include <StorageKit.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
cmCPackGenerator::cmCPackGenerator()
|
cmCPackGenerator::cmCPackGenerator()
|
||||||
{
|
{
|
||||||
@ -1020,6 +1024,16 @@ const char* cmCPackGenerator::GetInstallPath()
|
|||||||
this->InstallPath += this->GetOption("CPACK_PACKAGE_NAME");
|
this->InstallPath += this->GetOption("CPACK_PACKAGE_NAME");
|
||||||
this->InstallPath += "-";
|
this->InstallPath += "-";
|
||||||
this->InstallPath += this->GetOption("CPACK_PACKAGE_VERSION");
|
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
|
#else
|
||||||
this->InstallPath = "/usr/local/";
|
this->InstallPath = "/usr/local/";
|
||||||
#endif
|
#endif
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#if defined(__HAIKU__)
|
||||||
|
#include <StorageKit.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
cmLocalGenerator::cmLocalGenerator()
|
cmLocalGenerator::cmLocalGenerator()
|
||||||
{
|
{
|
||||||
this->Makefile = 0; // moved to after set on global
|
this->Makefile = 0; // moved to after set on global
|
||||||
@ -357,6 +361,19 @@ void cmLocalGenerator::GenerateInstallRules()
|
|||||||
}
|
}
|
||||||
prefix = prefix_win32.c_str();
|
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
|
#else
|
||||||
if (!prefix)
|
if (!prefix)
|
||||||
{
|
{
|
||||||
|
@ -131,6 +131,8 @@ if ${cmake_system_mingw}; then
|
|||||||
else
|
else
|
||||||
cmake_default_prefix="c:/Program Files/CMake"
|
cmake_default_prefix="c:/Program Files/CMake"
|
||||||
fi
|
fi
|
||||||
|
elif ${cmake_system_haiku}; then
|
||||||
|
cmake_default_prefix=`/bin/finddir B_COMMON_DIRECTORY`
|
||||||
else
|
else
|
||||||
cmake_default_prefix="/usr/local"
|
cmake_default_prefix="/usr/local"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user