diff -urN cmake-2.8-git/Modules/FindGLUT.cmake cmake-2.8-git-haiku/Modules/FindGLUT.cmake
|
old
|
new
|
|
| 84 | 84 | if (GLUT_FOUND) |
| 85 | 85 | # Is -lXi and -lXmu required on all platforms that have it? |
| 86 | 86 | # If not, we need some way to figure out what platform we are on. |
| 87 | | set( GLUT_LIBRARIES |
| 88 | | ${GLUT_glut_LIBRARY} |
| 89 | | ${GLUT_Xmu_LIBRARY} |
| 90 | | ${GLUT_Xi_LIBRARY} |
| 91 | | ${GLUT_cocoa_LIBRARY} |
| 92 | | ) |
| | 87 | if(BEOS OR HAIKU) |
| | 88 | set( GLUT_LIBRARIES |
| | 89 | ${GLUT_glut_LIBRARY} |
| | 90 | ) |
| | 91 | else |
| | 92 | set( GLUT_LIBRARIES |
| | 93 | ${GLUT_glut_LIBRARY} |
| | 94 | ${GLUT_Xmu_LIBRARY} |
| | 95 | ${GLUT_Xi_LIBRARY} |
| | 96 | ${GLUT_cocoa_LIBRARY} |
| | 97 | ) |
| | 98 | endif() |
| 93 | 99 | |
| 94 | 100 | #The following deprecated settings are for backwards compatibility with CMake1.4 |
| 95 | 101 | set (GLUT_LIBRARY ${GLUT_LIBRARIES}) |
diff -urN cmake-2.8-git/Modules/FindOpenGL.cmake cmake-2.8-git-haiku/Modules/FindOpenGL.cmake
|
old
|
new
|
|
| 95 | 95 | /usr/share/doc/NVIDIA_GLX-1.0/include |
| 96 | 96 | /usr/openwin/share/include |
| 97 | 97 | /opt/graphics/OpenGL/include /usr/X11R6/include |
| | 98 | /boot/develop/headers/os/opengl |
| 98 | 99 | ) |
| 99 | 100 | |
| 100 | 101 | find_library(OPENGL_gl_LIBRARY |
diff -urN cmake-2.8-git/Modules/Platform/Haiku.cmake cmake-2.8-git-haiku/Modules/Platform/Haiku.cmake
|
old
|
new
|
|
| 1 | | set(BEOS 1) |
| 2 | | |
| 3 | | set(CMAKE_DL_LIBS root be) |
| 4 | | set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC") |
| 5 | | set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE") |
| | 1 | set(HAIKU 1) |
| | 2 | set(UNIX 1) |
| | 3 | |
| | 4 | set(CMAKE_DL_LIBS "") |
| 6 | 5 | set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") |
| 7 | | set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart") |
| | 6 | set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") |
| 8 | 7 | set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") |
| 9 | 8 | set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") |
| | 9 | set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") |
| 10 | 10 | set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") |
| 11 | | |
| 12 | | include(Platform/UnixPaths) |
| 13 | | list(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common) |
| 14 | | list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/common/include) |
| 15 | | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/common/lib) |
| 16 | | list(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin) |
| 17 | | list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib) |
| | 11 | set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") |
| | 12 | |
| | 13 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH |
| | 14 | /boot/common/non-packaged |
| | 15 | /boot/common |
| | 16 | /boot/system |
| | 17 | ) |
| | 18 | list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES |
| | 19 | /boot/common/non-packaged/lib |
| | 20 | /boot/common/lib |
| | 21 | /boot/develop/lib/x86 |
| | 22 | ) |
| 18 | 23 | list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty) |
| 19 | 24 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/develop/lib/x86) |
| 20 | 25 | |
diff -urN cmake-2.8-git/Source/cmExportCommand.cxx cmake-2.8-git-haiku/Source/cmExportCommand.cxx
|
old
|
new
|
|
| 20 | 20 | #include "cmExportBuildFileGenerator.h" |
| 21 | 21 | |
| 22 | 22 | #if defined(__HAIKU__) |
| 23 | | #include <StorageKit.h> |
| | 23 | #include <FindDirectory.h> |
| | 24 | #include <StorageDefs.h> |
| 24 | 25 | #endif |
| 25 | 26 | |
| 26 | 27 | cmExportCommand::cmExportCommand() |
| … |
… |
|
| 305 | 306 | const char* hash) |
| 306 | 307 | { |
| 307 | 308 | #if defined(__HAIKU__) |
| 308 | | BPath dir; |
| 309 | | if (find_directory(B_USER_SETTINGS_DIRECTORY, &dir) != B_OK) |
| | 309 | char dir[B_PATH_NAME_LENGTH]; |
| | 310 | if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, dir, sizeof(dir)) != |
| | 311 | B_OK) |
| 310 | 312 | { |
| 311 | 313 | return; |
| 312 | 314 | } |
| 313 | | dir.Append("cmake/packages"); |
| 314 | | dir.Append(package.c_str()); |
| 315 | | std::string fname = dir.Path(); |
| | 315 | std::string fname = dir; |
| | 316 | fname += "/cmake/packages/"; |
| | 317 | fname += package; |
| 316 | 318 | #else |
| 317 | 319 | const char* home = cmSystemTools::GetEnv("HOME"); |
| 318 | 320 | if(!home) |
diff -urN cmake-2.8-git/Source/cmFindPackageCommand.cxx cmake-2.8-git-haiku/Source/cmFindPackageCommand.cxx
|
old
|
new
|
|
| 19 | 19 | #endif |
| 20 | 20 | |
| 21 | 21 | #if defined(__HAIKU__) |
| 22 | | #include <StorageKit.h> |
| | 22 | #include <string.h> |
| | 23 | #include <FindDirectory.h> |
| | 24 | #include <StorageDefs.h> |
| 23 | 25 | #endif |
| 24 | 26 | |
| 25 | 27 | void cmFindPackageNeedBackwardsCompatibility(const std::string& variable, |
| … |
… |
|
| 1584 | 1586 | #if defined(_WIN32) && !defined(__CYGWIN__) |
| 1585 | 1587 | this->LoadPackageRegistryWinUser(); |
| 1586 | 1588 | #elif defined(__HAIKU__) |
| 1587 | | BPath dir; |
| 1588 | | if (find_directory(B_USER_SETTINGS_DIRECTORY, &dir) == B_OK) |
| | 1589 | char dir[B_PATH_NAME_LENGTH]; |
| | 1590 | if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, dir, sizeof(dir)) == |
| | 1591 | B_OK) |
| 1589 | 1592 | { |
| 1590 | | dir.Append("cmake/packages"); |
| 1591 | | dir.Append(this->Name.c_str()); |
| 1592 | | this->LoadPackageRegistryDir(dir.Path()); |
| | 1593 | strlcat(dir, "/cmake/packages/", sizeof(dir)); |
| | 1594 | strlcat(dir, this->Name.c_str(), sizeof(dir)); |
| | 1595 | this->LoadPackageRegistryDir(dir); |
| 1593 | 1596 | } |
| 1594 | 1597 | #else |
| 1595 | 1598 | if(const char* home = cmSystemTools::GetEnv("HOME")) |
diff -urN cmake-2.8-git/Source/cmLocalGenerator.cxx cmake-2.8-git-haiku/Source/cmLocalGenerator.cxx
|
old
|
new
|
|
| 37 | 37 | #include <assert.h> |
| 38 | 38 | |
| 39 | 39 | #if defined(__HAIKU__) |
| 40 | | #include <StorageKit.h> |
| | 40 | #include <FindDirectory.h> |
| | 41 | #include <StorageDefs.h> |
| 41 | 42 | #endif |
| 42 | 43 | |
| 43 | 44 | cmLocalGenerator::cmLocalGenerator() |
| … |
… |
|
| 354 | 355 | prefix = prefix_win32.c_str(); |
| 355 | 356 | } |
| 356 | 357 | #elif defined(__HAIKU__) |
| | 358 | char dir[B_PATH_NAME_LENGTH]; |
| 357 | 359 | if (!prefix) |
| 358 | 360 | { |
| 359 | | BPath dir; |
| 360 | | if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK) |
| | 361 | if (find_directory(B_COMMON_DIRECTORY, -1, false, dir, sizeof(dir)) == B_OK) |
| 361 | 362 | { |
| 362 | | prefix = dir.Path(); |
| | 363 | prefix = dir; |
| 363 | 364 | } |
| 364 | 365 | else |
| 365 | 366 | { |
diff -urN cmake-2.8-git/Source/CPack/cmCPackGenerator.cxx cmake-2.8-git-haiku/Source/CPack/cmCPackGenerator.cxx
|
old
|
new
|
|
| 26 | 26 | #include <algorithm> |
| 27 | 27 | |
| 28 | 28 | #if defined(__HAIKU__) |
| 29 | | #include <StorageKit.h> |
| | 29 | #include <FindDirectory.h> |
| | 30 | #include <StorageDefs.h> |
| 30 | 31 | #endif |
| 31 | 32 | |
| 32 | 33 | //---------------------------------------------------------------------- |
| … |
… |
|
| 1263 | 1264 | this->InstallPath += "-"; |
| 1264 | 1265 | this->InstallPath += this->GetOption("CPACK_PACKAGE_VERSION"); |
| 1265 | 1266 | #elif defined(__HAIKU__) |
| 1266 | | BPath dir; |
| 1267 | | if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK) |
| | 1267 | char dir[B_PATH_NAME_LENGTH]; |
| | 1268 | if (find_directory(B_COMMON_DIRECTORY, -1, false, dir, sizeof(dir)) == B_OK) |
| 1268 | 1269 | { |
| 1269 | | this->InstallPath = dir.Path(); |
| | 1270 | this->InstallPath = dir; |
| 1270 | 1271 | } |
| 1271 | 1272 | else |
| 1272 | 1273 | { |
diff -urN cmake-2.8-git/Utilities/cmcurl/CMake/CurlTests.c cmake-2.8-git-haiku/Utilities/cmcurl/CMake/CurlTests.c
|
old
|
new
|
|
| 38 | 38 | # define PLATFORM_AIX_V3 |
| 39 | 39 | #endif |
| 40 | 40 | |
| 41 | | #if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || (defined(__BEOS__) && !defined(__HAIKU__)) |
| | 41 | #if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__) |
| 42 | 42 | #error "O_NONBLOCK does not work on this platform" |
| 43 | 43 | #endif |
| 44 | 44 | int socket; |
diff -urN cmake-2.8-git/Utilities/cmcurl/select.c cmake-2.8-git-haiku/Utilities/cmcurl/select.c
|
old
|
new
|
|
| 39 | 39 | #error "We can't compile without select() support!" |
| 40 | 40 | #endif |
| 41 | 41 | |
| 42 | | #if defined(__BEOS__) && !defined(__HAIKU__) |
| | 42 | #if defined(__BEOS__) |
| 43 | 43 | /* BeOS has FD_SET defined in socket.h */ |
| 44 | 44 | #include <socket.h> |
| 45 | 45 | #endif |
diff -urN cmake-2.8-git/Utilities/cmzlib/zconf.h cmake-2.8-git-haiku/Utilities/cmzlib/zconf.h
|
old
|
new
|
|
| 237 | 237 | # endif |
| 238 | 238 | #endif |
| 239 | 239 | |
| 240 | | #if defined (__BEOS__) && !defined (__HAIKU__) |
| | 240 | #if defined (__BEOS__) |
| 241 | 241 | # ifdef ZLIB_DLL |
| 242 | 242 | # ifdef ZLIB_INTERNAL |
| 243 | 243 | # define ZEXPORT __declspec(dllexport) |
diff -urN cmake-2.8-git/Utilities/cmzlib/zutil.h cmake-2.8-git-haiku/Utilities/cmzlib/zutil.h
|
old
|
new
|
|
| 147 | 147 | # define OS_CODE 0x0f |
| 148 | 148 | #endif |
| 149 | 149 | |
| 150 | | /* Haiku defines both __HAIKU__ and __BEOS__ (for now) */ |
| 151 | | /* many BeOS workarounds are no longer needed in Haiku */ |
| 152 | | #if defined(__HAIKU__) && defined(__BEOS__) |
| 153 | | #undef __BEOS__ |
| 154 | | #endif |
| 155 | | |
| 156 | 150 | #if defined(_BEOS_) || defined(RISCOS) |
| 157 | 151 | # define fdopen(fd,mode) NULL /* No fdopen() */ |
| 158 | 152 | #endif |