From fb7c95dd6615f827a21e8b43ef5dcf5fc23ebc25 Mon Sep 17 00:00:00 2001 From: undef-in-ed Date: Thu, 15 Mar 2012 20:27:44 +0000 Subject: [PATCH] CMake: fix problem occurring with Wardje's setup For Wardje both tests (with and without Xxf86vm) failed because of gcc being unable to execute 'as'. His error log showed also tests executed by FindX11 (provided by CMake itself) failed because of this. Not sure what is broken exactly but this patch circumvents it. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10980 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- cmake/FindIrrlicht.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/FindIrrlicht.cmake b/cmake/FindIrrlicht.cmake index 3639ebdc1..39eedd717 100644 --- a/cmake/FindIrrlicht.cmake +++ b/cmake/FindIrrlicht.cmake @@ -65,16 +65,16 @@ if(UNIX AND NOT APPLE AND NOT CYGWIN) set(CMAKE_REQUIRED_LIBRARIES ${IRRLICHT_LIBRARIES}) check_cxx_source_compiles(${IRRLICHT_SNIPPET} IRRLICHT_WITHOUT_XF86VM) - # If it does not work without Xxf86vm library... + # If it did not work without Xxf86vm library try with it again if(NOT IRRLICHT_WITHOUT_XF86VM) set(CMAKE_REQUIRED_LIBRARIES ${IRRLICHT_LIBRARIES} ${IRRLICHT_XF86VM_LIBRARY}) check_cxx_source_compiles(${IRRLICHT_SNIPPET} IRRLICHT_WITH_XF86VM) - # ... but with Xxf86vm, then add this library to Irrlicht dependencies - if(IRRLICHT_WITH_XF86VM) - set(IRRLICHT_LIBRARIES ${IRRLICHT_LIBRARIES} ${IRRLICHT_XF86VM_LIBRARY}) - else() + if(NOT IRRLICHT_WITH_XF86VM) message(WARNING "Irrlicht does not compile with and without Xxf86vm") endif() + + # Add Xxf86vm nevertheless as tests might fail under strange circumstances + set(IRRLICHT_LIBRARIES ${IRRLICHT_LIBRARIES} ${IRRLICHT_XF86VM_LIBRARY}) endif() endif()