Merge topic 'Haiku'

0380f36 FindOpenGL: add Haiku paths
8e9630c FindGLUT: BeOS does not have libXi and libXmu
50bfedf FindLua51: do not try to link libm on BeOS
3d2e6a0 check for Haiku only with __HAIKU__
7a1b961 Haiku no longer defines __BEOS__
ed96d9a bootstrap: use better defaults for Haiku
This commit is contained in:
Brad King 2013-01-10 10:22:14 -05:00 committed by CMake Topic Stage
commit 42d9df9f4f
9 changed files with 52 additions and 31 deletions

View File

@ -74,12 +74,8 @@
PRINT *, 'INFO:platform[IRIX]' PRINT *, 'INFO:platform[IRIX]'
#elif defined(__hpux) || defined(__hpux__) #elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:platform[HP-UX]' PRINT *, 'INFO:platform[HP-UX]'
#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU) #elif defined(__HAIKU__)
PRINT *, 'INFO:platform[Haiku]' PRINT *, 'INFO:platform[Haiku]'
# if 0
! Haiku also defines __BEOS__ so we must
! put it prior to the check for __BEOS__
# endif
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
PRINT *, 'INFO:platform[BeOS]' PRINT *, 'INFO:platform[BeOS]'
#elif defined(__QNX__) || defined(__QNXNTO__) #elif defined(__QNX__) || defined(__QNXNTO__)

View File

@ -35,11 +35,8 @@
#elif defined(__hpux) || defined(__hpux__) #elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX" # define PLATFORM_ID "HP-UX"
#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU) #elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku" # define PLATFORM_ID "Haiku"
/* Haiku also defines __BEOS__ so we must
put it prior to the check for __BEOS__
*/
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS" # define PLATFORM_ID "BeOS"

View File

@ -16,7 +16,7 @@ int main(int ac, char*av[]){
pthread_create(&tid[0], 0, runner, (void*)1); pthread_create(&tid[0], 0, runner, (void*)1);
pthread_create(&tid[1], 0, runner, (void*)2); pthread_create(&tid[1], 0, runner, (void*)2);
#if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__) // (no usleep on BeOS 5.) #if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.)
usleep(1); // for strange behavior on single-processor sun usleep(1); // for strange behavior on single-processor sun
#endif #endif

View File

@ -40,25 +40,39 @@ else ()
set(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX") set(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
else () else ()
if (BEOS)
set(_GLUT_INC_DIR /boot/develop/headers/os/opengl)
set(_GLUT_glut_LIB_DIR /boot/develop/lib/x86)
else()
find_library( GLUT_Xi_LIBRARY Xi
/usr/openwin/lib
)
find_library( GLUT_Xmu_LIBRARY Xmu
/usr/openwin/lib
)
endif ()
find_path( GLUT_INCLUDE_DIR GL/glut.h find_path( GLUT_INCLUDE_DIR GL/glut.h
/usr/include/GL /usr/include/GL
/usr/openwin/share/include /usr/openwin/share/include
/usr/openwin/include /usr/openwin/include
/opt/graphics/OpenGL/include /opt/graphics/OpenGL/include
/opt/graphics/OpenGL/contrib/libglut /opt/graphics/OpenGL/contrib/libglut
${_GLUT_INC_DIR}
) )
find_library( GLUT_glut_LIBRARY glut find_library( GLUT_glut_LIBRARY glut
/usr/openwin/lib /usr/openwin/lib
${_GLUT_glut_LIB_DIR}
) )
find_library( GLUT_Xi_LIBRARY Xi unset(_GLUT_INC_DIR)
/usr/openwin/lib unset(_GLUT_glut_LIB_DIR)
)
find_library( GLUT_Xmu_LIBRARY Xmu
/usr/openwin/lib
)
endif () endif ()

View File

@ -54,7 +54,7 @@ find_library(LUA_LIBRARY
if(LUA_LIBRARY) if(LUA_LIBRARY)
# include the math library for Unix # include the math library for Unix
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE AND NOT BEOS)
find_library(LUA_MATH_LIBRARY m) find_library(LUA_MATH_LIBRARY m)
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries") set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library # For Windows and Mac, don't need to explicitly include the math library

View File

@ -58,14 +58,22 @@ else ()
find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX") find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX")
else() else()
# Handle HP-UX cases where we only want to find OpenGL in either hpux64 if (CMAKE_SYSTEM_NAME MATCHES "HP-UX")
# or hpux32 depending on if we're doing a 64 bit build. # Handle HP-UX cases where we only want to find OpenGL in either hpux64
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # or hpux32 depending on if we're doing a 64 bit build.
set(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/) if(CMAKE_SIZEOF_VOID_P EQUAL 4)
else() set(_OPENGL_LIB_PATH
set(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/)
/opt/graphics/OpenGL/lib/hpux64/ else()
/opt/graphics/OpenGL/lib/pa20_64) set(_OPENGL_LIB_PATH
/opt/graphics/OpenGL/lib/hpux64/
/opt/graphics/OpenGL/lib/pa20_64)
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL Haiku)
set(_OPENGL_LIB_PATH
/boot/develop/lib/x86)
set(_OPENGL_INCLUDE_PATH
/boot/develop/headers/os/opengl)
endif() endif()
# The first line below is to make sure that the proper headers # The first line below is to make sure that the proper headers
@ -80,6 +88,7 @@ else ()
/usr/share/doc/NVIDIA_GLX-1.0/include /usr/share/doc/NVIDIA_GLX-1.0/include
/usr/openwin/share/include /usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include /opt/graphics/OpenGL/include /usr/X11R6/include
${_OPENGL_INCLUDE_PATH}
) )
find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
@ -93,9 +102,12 @@ else ()
PATHS /opt/graphics/OpenGL/lib PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib /usr/openwin/lib
/usr/shlib /usr/X11R6/lib /usr/shlib /usr/X11R6/lib
${HPUX_IA_OPENGL_LIB_PATH} ${_OPENGL_LIB_PATH}
) )
unset(_OPENGL_INCLUDE_PATH)
unset(_OPENGL_LIB_PATH)
# On Unix OpenGL most certainly always requires X11. # On Unix OpenGL most certainly always requires X11.
# Feel free to tighten up these conditions if you don't # Feel free to tighten up these conditions if you don't
# think this is always true. # think this is always true.

View File

@ -33,7 +33,7 @@
#endif #endif
#if !defined(_WIN32) \ #if !defined(_WIN32) \
&& !defined(__QNXNTO__) && !defined(__BEOS__) && !defined(__QNXNTO__) && !defined(__BEOS__) && !defined(__HAIKU__)
# include "cmCPackDebGenerator.h" # include "cmCPackDebGenerator.h"
# include "cmCPackRPMGenerator.h" # include "cmCPackRPMGenerator.h"
#endif #endif
@ -126,7 +126,7 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory()
} }
#endif #endif
#if !defined(_WIN32) \ #if !defined(_WIN32) \
&& !defined(__QNXNTO__) && !defined(__BEOS__) && !defined(__QNXNTO__) && !defined(__BEOS__) && !defined(__HAIKU__)
if (cmCPackDebGenerator::CanGenerate()) if (cmCPackDebGenerator::CanGenerate())
{ {
this->RegisterGenerator("DEB", "Debian packages", this->RegisterGenerator("DEB", "Debian packages",

View File

@ -53,7 +53,7 @@
#include <cm_zlib.h> #include <cm_zlib.h>
#include <cmsys/Base64.h> #include <cmsys/Base64.h>
#if defined(__BEOS__) && !defined(__HAIKU__) #if defined(__BEOS__)
#include <be/kernel/OS.h> /* disable_debugger() API. */ #include <be/kernel/OS.h> /* disable_debugger() API. */
#endif #endif

View File

@ -159,7 +159,9 @@ if ${cmake_system_mingw}; then
cmake_default_prefix="c:/Program Files/CMake" cmake_default_prefix="c:/Program Files/CMake"
fi fi
elif ${cmake_system_haiku}; then elif ${cmake_system_haiku}; then
cmake_default_prefix=`/bin/finddir B_COMMON_DIRECTORY` cmake_default_prefix=`finddir B_COMMON_DIRECTORY`
cmake_man_dir="/documentation/man"
cmake_doc_dir="/documentation/doc/cmake-${cmake_version}"
else else
cmake_default_prefix="/usr/local" cmake_default_prefix="/usr/local"
fi fi