aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/FindIrrlicht.cmake
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-02-01 10:45:55 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-02-01 10:45:55 +0200
commit56320f7e8de3cf31cbaf11492528016c4446d8f4 (patch)
tree30438e2bd64bbb30344cfe18c943ea13a2c51639 /cmake/Modules/FindIrrlicht.cmake
parent6e196c2ce4285c0aea2a5c714e842d90c1b84b43 (diff)
downloadminetest-56320f7e8de3cf31cbaf11492528016c4446d8f4.tar.gz
minetest-56320f7e8de3cf31cbaf11492528016c4446d8f4.tar.bz2
minetest-56320f7e8de3cf31cbaf11492528016c4446d8f4.zip
Hopefully fixed the problem of IRRLICHT_SOURCE_DIR being not considered when a local version of irrlicht is found.
Diffstat (limited to 'cmake/Modules/FindIrrlicht.cmake')
-rw-r--r--cmake/Modules/FindIrrlicht.cmake16
1 files changed, 12 insertions, 4 deletions
diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake
index 246e72cfb..01e7088c9 100644
--- a/cmake/Modules/FindIrrlicht.cmake
+++ b/cmake/Modules/FindIrrlicht.cmake
@@ -10,22 +10,30 @@ endif( UNIX )
# Find include directory
+if(NOT IRRLICHT_SOURCE_DIR STREQUAL "")
+ set(IRRLICHT_SOURCE_DIR_INCLUDE
+ "${IRRLICHT_SOURCE_DIR}/include"
+ )
+ set(IRRLICHT_SOURCE_DIR_LIBS
+ "${IRRLICHT_SOURCE_DIR}/lib/Win32-visualstudio"
+ "${IRRLICHT_SOURCE_DIR}/lib/Win32-gcc"
+ )
+endif()
+
FIND_PATH(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h
PATHS
+ "${IRRLICHT_SOURCE_DIR_INCLUDE}"
/usr/local/include/irrlicht
/usr/include/irrlicht
- "${IRRLICHT_SOURCE_DIR}/include"
)
# Find library directory
FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.a Irrlicht
PATHS
+ "${IRRLICHT_SOURCE_DIR_LIBS}"
/usr/local/lib
/usr/lib
- #${IRRLICHT_PLATFORM_DIR}
- "${IRRLICHT_SOURCE_DIR}/lib/Win32-visualstudio"
- "${IRRLICHT_SOURCE_DIR}/lib/Win32-gcc"
)
MESSAGE(STATUS "IRRLICHT_INCLUDE_DIR = ${IRRLICHT_INCLUDE_DIR}")