Hopefully fixed the problem of IRRLICHT_SOURCE_DIR being not considered when a local version of irrlicht is found.

This commit is contained in:
Perttu Ahola 2011-02-01 10:45:55 +02:00
parent 6e196c2ce4
commit 56320f7e8d

@ -10,22 +10,30 @@ endif( UNIX )
# Find include directory # 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 FIND_PATH(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h
PATHS PATHS
"${IRRLICHT_SOURCE_DIR_INCLUDE}"
/usr/local/include/irrlicht /usr/local/include/irrlicht
/usr/include/irrlicht /usr/include/irrlicht
"${IRRLICHT_SOURCE_DIR}/include"
) )
# Find library directory # Find library directory
FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.a Irrlicht FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.a Irrlicht
PATHS PATHS
"${IRRLICHT_SOURCE_DIR_LIBS}"
/usr/local/lib /usr/local/lib
/usr/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}") MESSAGE(STATUS "IRRLICHT_INCLUDE_DIR = ${IRRLICHT_INCLUDE_DIR}")