Better cmake detection for older FriBidi versions.
Applied the patch attached to bug #17152. (I don't have the old version of FriBidi, so haven't tested been able to test it, but still works with newer versions of FriBidi.)
This commit is contained in:
parent
7c3380c556
commit
ad31cdaf27
2 changed files with 18 additions and 1 deletions
|
@ -60,6 +60,7 @@ Version 1.9.3+svn:
|
|||
* Add update-po4a-man and update-po4a-manual targets to cmake.
|
||||
* Added: Extra validate macro VALIDATE_WITH_DEV_MESSAGE.
|
||||
* Fixed: Link to libintl with cmake (bug #17152).
|
||||
* Fixed: Better cmake detection for older FriBidi versions (bug #17151).
|
||||
|
||||
Version 1.9.3:
|
||||
* Campaigns:
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
# FRIBIDI_FOUND, If false, do not try to use PNG.
|
||||
# also defined, but not for general use are
|
||||
# FRIBIDI_LIBRARY, where to find the FriBiDi library.
|
||||
#
|
||||
# If this module finds an old version of fribidi, then this module will run
|
||||
# add_definitions(-DOLD_FRIBIDI) so that Wesnoth will compile.
|
||||
|
||||
include(CheckSymbolExists)
|
||||
|
||||
|
@ -32,10 +35,23 @@ IF (FRIBIDI_LIBRARY AND FRIBIDI_INCLUDE_DIR)
|
|||
SET(CMAKE_REQUIRED_LIBRARIES ${FRIBIDI_LIBRARY})
|
||||
CHECK_SYMBOL_EXISTS(fribidi_utf8_to_unicode fribidi.h FOUND_fribidi_utf8_to_unicode)
|
||||
CHECK_SYMBOL_EXISTS(fribidi_charset_to_unicode fribidi.h FOUND_fribidi_charset_to_unicode)
|
||||
if(FOUND_fribidi_charset_to_unicode)
|
||||
CHECK_SYMBOL_EXISTS(FRIBIDI_CHAR_SET_UTF8 fribidi.h FOUND_FRIBIDI_CHAR_SET_UTF8)
|
||||
|
||||
# FriBiDi provides both fribidi_utf8_to_unicode and fribidi_charset_to_unicode.
|
||||
# The difference is that
|
||||
# 1. fribidi >= 0.10.5 has FRIBIDI_CHAR_SET_UTF8.
|
||||
# 2. fribidi <= 0.10.4 has FRIBIDI_CHARSET_UTF8.
|
||||
# Wesnoth has two methods to use FriBiDi.
|
||||
# 1. Use fribidi_charset_to_unicode and FRIBIDI_CHAR_SET_UTF8.
|
||||
# 2. Define OLD_FRIBIDI and use fribidi_utf8_to_unicode.
|
||||
# To compile Wesnoth with fribidi <= 0.10.4, we must define OLD_FRIBIDI.
|
||||
|
||||
if(FOUND_fribidi_charset_to_unicode AND FOUND_FRIBIDI_CHAR_SET_UTF8)
|
||||
# fribidi >= 0.10.5
|
||||
SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
|
||||
SET(FRIBIDI_FOUND "YES")
|
||||
elseif(FOUND_fribidi_utf8_to_unicode)
|
||||
# fribidi <= 0.10.4
|
||||
SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
|
||||
SET(FRIBIDI_FOUND "YES")
|
||||
add_definitions(-DOLD_FRIBIDI)
|
||||
|
|
Loading…
Add table
Reference in a new issue