diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-01-08 03:10:20 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-01-08 03:10:20 +0200 |
commit | d825ed572f97d7d354c84106e508d52255f5e94b (patch) | |
tree | c01f491235831b7ad0275f99aab3b677a4c11ebd /cmake | |
parent | 683b08beefae3c4842e4261dd379f2dadbe8ccbe (diff) | |
download | minetest-d825ed572f97d7d354c84106e508d52255f5e94b.tar.gz minetest-d825ed572f97d7d354c84106e508d52255f5e94b.tar.bz2 minetest-d825ed572f97d7d354c84106e508d52255f5e94b.zip |
CMake working on Linux (not on windows)
--HG--
rename : Makefile => Makefile.bak
Diffstat (limited to 'cmake')
-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) + |