Improve FindIrrlicht.cmake module
authorMarkus Koschany <apo@gambaru.de>
Sat, 21 Feb 2015 16:46:33 +0000 (17:46 +0100)
committerLoic Blot <loic.blot@unix-experience.fr>
Sat, 21 Feb 2015 17:21:10 +0000 (18:21 +0100)
Linux distributions prefer to link against a shared version of the Irrlicht
engine instead of using embedded code copies of the same. Search for this
shared version first and use that but fall back to the static version if it
does not exist.

This also fixes https://github.com/minetest/minetest/issues/2163

cmake/Modules/FindIrrlicht.cmake

index dce78fbaa8937719de04bd1f3d70e1045f9875d0..a84765d4e99ee76e13f4be5b526dbefc089a204b 100644 (file)
@@ -44,7 +44,7 @@ else()
                /usr/include/irrlicht
        )
 
-       FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.a Irrlicht
+       FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht
                PATHS
                /usr/local/lib
                /usr/lib