diff options
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/FindIrrlicht.cmake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake new file mode 100644 index 000000000..c39a8cbfb --- /dev/null +++ b/cmake/Modules/FindIrrlicht.cmake @@ -0,0 +1,38 @@ +MESSAGE(STATUS "IRRDIR = $ENV{IRRDIR}") + +FIND_PATH(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h + PATHS + $ENV{IRRDIR}/include + /usr/local/include/irrlicht + /usr/include/irrlicht +) + +MESSAGE(STATUS "IRRLICHT_INCLUDE_DIR = ${IRRLICHT_INCLUDE_DIR}") + +FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.a Irrlicht + PATHS + $ENV{IRRDIR}/lib + $ENV{IRRDIR}/lib/Linux + $ENV{IRRDIR}/lib/MacOSX + $ENV{IRRDIR}/lib/Win32-gcc + $ENV{IRRDIR}/lib/Win32-visualstudio + $ENV{IRRDIR}/lib/Win64-visualstudio + /usr/local/lib + /usr/lib +) + +MESSAGE(STATUS "IRRLICHT_LIBRARY = ${IRRLICHT_LIBRARY}") + +# handle the QUIETLY and REQUIRED arguments and set IRRLICHT_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(IRRLICHT DEFAULT_MSG IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) + +IF(IRRLICHT_FOUND) + SET(IRRLICHT_LIBRARIES ${IRRLICHT_LIBRARY}) +ELSE(IRRLICHT_FOUND) + SET(IRRLICHT_LIBRARIES) +ENDIF(IRRLICHT_FOUND) + +MARK_AS_ADVANCED(IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) + |