CMake: fix hybrid detection, and SDL libs detection

* The check for hybrids sometimes didn't work because the end of line
from the compiler output was stripped. Make sure there is always a
newline in the string so the regexp can match.
* The path prefix for SDL sub-libraries (image, ttf and mixer) are
wrong. Add the correct prefix, but leave the wrong ones for backward
compatibility.
This commit is contained in:
Adrien Destugues
2014-01-05 22:54:49 +01:00
parent d289d81e5a
commit f4c103d15e
2 changed files with 77 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ LICENSE="CMake"
COPYRIGHT="2002-2013 Kitware, Inc., Insight Consortium, All rights reserved."
SRC_URI="http://www.cmake.org/files/v2.8/cmake-2.8.11.2.tar.gz"
CHECKSUM_MD5="6f5d7b8e7534a5d9e1a7664ba63cf882"
REVISION="6"
REVISION="7"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
PROVIDES="

View File

@@ -1771,3 +1771,79 @@ index dd4c55e..36576d1 100644
--
1.8.3.4
From 6746cfb5f706471d49f243a036589be7f6f0e226 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 5 Jan 2014 22:24:23 +0100
Subject: Make sure the extraction of secondary arch works
Sometimes the string didn't end with a newline, leading to misdetection
of the secondary arch. Should fix use of CMake to build hybrid packages.
diff --git a/Modules/Platform/Haiku.cmake b/Modules/Platform/Haiku.cmake
index 36576d1..3d06566 100644
--- a/Modules/Platform/Haiku.cmake
+++ b/Modules/Platform/Haiku.cmake
@@ -39,7 +39,7 @@ execute_process(
RESULT_VARIABLE _HAIKU_SEARCH_DIRS_FOUND
OUTPUT_STRIP_TRAILING_WHITESPACE)
-string(REGEX MATCH "libraries: =?([^\n]*:)?/boot/system/develop/lib/([^/]*)/[:^\n]" _dummy "${_HAIKU_SEARCH_DIRS}")
+string(REGEX MATCH "libraries: =?([^\n]*:)?/boot/system/develop/lib/([^/]*)/[:\n]" _dummy "${_HAIKU_SEARCH_DIRS}\n")
set(CMAKE_HAIKU_SECONDARY_ARCH "${CMAKE_MATCH_2}")
if(NOT CMAKE_HAIKU_SECONDARY_ARCH)
--
1.8.3.4
From 3f7e225897df9e71dee6745cca2ec4f1defd0298 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 5 Jan 2014 22:46:37 +0100
Subject: Fix search directories for SDL image,mixer,ttf.
The path starting with "include" should probably be removed, but I fear
of breaking other platforms.
diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake
index 30d74ac..5685434 100644
--- a/Modules/FindSDL_image.cmake
+++ b/Modules/FindSDL_image.cmake
@@ -40,7 +40,7 @@ find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
- PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
+ PATH_SUFFIXES SDL include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_IMAGE_LIBRARY AND SDLIMAGE_LIBRARY)
diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake
index 8ca7cc3..80b7b60 100644
--- a/Modules/FindSDL_mixer.cmake
+++ b/Modules/FindSDL_mixer.cmake
@@ -40,7 +40,7 @@ find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
- PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
+ PATH_SUFFIXES SDL include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_MIXER_LIBRARY AND SDLMIXER_LIBRARY)
diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake
index bb0ca91..91577d6 100644
--- a/Modules/FindSDL_ttf.cmake
+++ b/Modules/FindSDL_ttf.cmake
@@ -40,7 +40,7 @@ find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h
HINTS
ENV SDLTTFDIR
ENV SDLDIR
- PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
+ PATH_SUFFIXES SDL include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_TTF_LIBRARY AND SDLTTF_LIBRARY)
--
1.8.3.4