Author: mordante
Date: Sun Mar 6 11:09:51 2011
New Revision: 48781
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48781&view=rev
Log:
Recognize newer versions of FriBidi again.
Newer versions don't define a symbol directly confusing cmake, fixed by
letting the compiler test whether it really doesn't exist. The issue was
spotted by Espreon.
Modified:
trunk/changelog
trunk/cmake/FindFriBiDi.cmake
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=48781&r1=48780&r2=48781&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Mar 6 11:09:51 2011
@@ -68,6 +68,7 @@
* Unit invalidation is processed in parallel using OpenMP
* Allow redirection of the logger.
* Polished gui2 code.
+ * Fixed: Newer versions of FriBidi were no longer recognized.
Version 1.9.4:
* AI:
Modified: trunk/cmake/FindFriBiDi.cmake
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/cmake/FindFriBiDi.cmake?rev=48781&r1=48780&r2=48781&view=diff
==============================================================================
--- trunk/cmake/FindFriBiDi.cmake (original)
+++ trunk/cmake/FindFriBiDi.cmake Sun Mar 6 11:09:51 2011
@@ -46,6 +46,24 @@
# 2. Define OLD_FRIBIDI and use fribidi_utf8_to_unicode.
# To compile Wesnoth with fribidi <= 0.10.4, we must define OLD_FRIBIDI.
+ # Newer versions of fribidi (not tested the initial version which has the
+ # issue, but at least 0.19.2 has the issue) no longer have the symbol
+ # FRIBIDI_CHAR_SET_UTF8. But the symbol is build with some macros confusing
+ # cmake. To test for that case let the compiler give its verdict.
+ if(FOUND_fribidi_charset_to_unicode AND NOT FOUND_FRIBIDI_CHAR_SET_UTF8)
+ file(WRITE "${CMAKE_BINARY_DIR}/fribidi_test.c"
+ "#include <fribidi.h>\nint main(){FriBidiCharSet s =
FRIBIDI_CHAR_SET_UTF8;}"
+ )
+ try_compile(FOUND_FRIBIDI_CHAR_SET_UTF8
+ "${CMAKE_BINARY_DIR}"
+ "${CMAKE_BINARY_DIR}/fribidi_test.c"
+ CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES:STRING=${FRIBIDI_INCLUDE_DIR}"
+ )
+
+ file(REMOVE "${CMAKE_BINARY_DIR}/fribidi_test.c")
+
+ endif(FOUND_fribidi_charset_to_unicode AND NOT FOUND_FRIBIDI_CHAR_SET_UTF8)
+
if(FOUND_fribidi_charset_to_unicode AND FOUND_FRIBIDI_CHAR_SET_UTF8)
# fribidi >= 0.10.5
SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits