From c1ed31ee9c24da1ec6254d62154888cee923fc02 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 2 Oct 2013 22:54:04 +0200 Subject: [PATCH] Fix search pathes for CMake 2.8.11.2. * This is only tested on gcc2 hybrids, help welcome testing it on other archs. --- .../cmake/patches/cmake-2.8.11.2.patchset | 59 ++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/dev-util/cmake/patches/cmake-2.8.11.2.patchset b/dev-util/cmake/patches/cmake-2.8.11.2.patchset index 4c04451fc..a79df203d 100644 --- a/dev-util/cmake/patches/cmake-2.8.11.2.patchset +++ b/dev-util/cmake/patches/cmake-2.8.11.2.patchset @@ -1,4 +1,4 @@ -From 9e15fe26a3a573bbe68face114d682b98a45c875 Mon Sep 17 00:00:00 2001 +From 7832e4b405ad774c3dae10607707745677723f66 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 1 Oct 2013 10:36:36 +0200 Subject: Convert existing patch to patchset format. @@ -256,3 +256,60 @@ index 6eb52d1..7a3b6fd 100644 -- 1.8.3.4 + +From 305991d869191c373398acc9605d29a92bf2b069 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Wed, 2 Oct 2013 15:22:57 +0200 +Subject: Fix include and lib search pathes + + * For gcc2, look in the legacy (no arch) direcotry. + * For gcc4, look inthe the platform dir (currently hardcoded to x86) + * This was tested only on gcc2hybrid. I'm not sure it matches other +platforms. + +diff --git a/Modules/Platform/Haiku.cmake b/Modules/Platform/Haiku.cmake +index 3236b58..dfb3526 100644 +--- a/Modules/Platform/Haiku.cmake ++++ b/Modules/Platform/Haiku.cmake +@@ -10,18 +10,33 @@ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") + set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") + set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") + ++# FIXME need to detect if we are on gcc4 or gcc4hybrid, the path are different ++if(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.0.0) ++ # Use gcc2 libs ++ set(__HAIKU_LIBDIR_SUFFIX "") ++else() ++ # Use gcc4 libs ++ set(__HAIKU_LIBDIR_SUFFIX "/x86") ++endif() ++ + list(APPEND CMAKE_SYSTEM_PREFIX_PATH + /boot/common/non-packaged + /boot/common + /boot/system + ) + list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES +- /boot/common/non-packaged/lib +- /boot/common/lib +- /boot/develop/lib/x86 ++ /boot/common/non-packaged/lib${__HAIKU_LIBDIR_SUFFIX} ++ /boot/common/develop/lib${__HAIKU_LIBDIR_SUFFIX} ++ /boot/system/develop/lib${__HAIKU_LIBDIR_SUFFIX} ++ ) ++list(APPEND CMAKE_SYSTEM_INCLUDE_PATH ++ /boot/common/develop/headers${__HAIKU_LIBDIR_SUFFIX} ++ /boot/system/develop/headers${__HAIKU_LIBDIR_SUFFIX} ++ ) ++list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ++ /boot/common/develop/lib${__HAIKU_LIBDIR_SUFFIX} ++ /boot/system/develop/lib${__HAIKU_LIBDIR_SUFFIX} + ) +-list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty) +-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 +-- +1.8.3.4 +