MinetestFindIrrlichtHeaders.cmake 795 B

1234567891011121314151617181920212223242526
  1. # Locate Irrlicht or IrrlichtMt headers on system.
  2. foreach(libname IN ITEMS IrrlichtMt Irrlicht)
  3. string(TOLOWER "${libname}" libname2)
  4. find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h
  5. DOC "Path to the directory with IrrlichtMt includes"
  6. PATHS
  7. /usr/local/include/${libname2}
  8. /usr/include/${libname2}
  9. /system/develop/headers/${libname2} #Haiku
  10. PATH_SUFFIXES "include/${libname2}"
  11. )
  12. if(IRRLICHT_INCLUDE_DIR)
  13. break()
  14. endif()
  15. endforeach()
  16. # Handholding for users
  17. if(IRRLICHT_INCLUDE_DIR AND (NOT IS_DIRECTORY "${IRRLICHT_INCLUDE_DIR}" OR
  18. NOT EXISTS "${IRRLICHT_INCLUDE_DIR}/irrlicht.h"))
  19. message(WARNING "IRRLICHT_INCLUDE_DIR was set to ${IRRLICHT_INCLUDE_DIR} "
  20. "but irrlicht.h does not exist inside. The path will not be used.")
  21. unset(IRRLICHT_INCLUDE_DIR CACHE)
  22. endif()