Mercurial > code
diff cmake/FindIrrlicht.cmake @ 624:01e01777ff50
CMake: initial import of CMake modules, closes #720
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 20 Oct 2017 14:18:37 +0200 |
parents | |
children | 5bd9424a523a |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cmake/FindIrrlicht.cmake Fri Oct 20 14:18:37 2017 +0200 @@ -0,0 +1,32 @@ +# FindIrrlicht +# ------------ +# +# Find Irrlicht library, this modules defines: +# +# Irrlicht_LIBRARY, the name of the library to link against +# Irrlicht_FOUND, if false, do not try to link to Irrlicht +# Irrlicht_INCLUDE_DIR, where to find irrlicht.h + +find_path( + Irrlicht_INCLUDE_DIR + NAMES irrlicht.h + PATH_SUFFIXES include/irrlicht +) + +find_library( + Irrlicht_LIBRARY + NAMES Irrlicht libIrrlicht +) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args( + Irrlicht + FOUND_VAR Irrlicht_FOUND + REQUIRED_VARS Irrlicht_LIBRARY Irrlicht_INCLUDE_DIR +) + +set(Irrlicht_LIBRARIES ${Irrlicht_LIBRARY}) +set(Irrlicht_INCLUDE_DIRS ${Irrlicht_INCLUDE_DIR}) + +mark_as_advanced(Irrlicht_INCLUDE_DIR Irrlicht_LIBRARY)