You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FindThirdPartyCEGUI_Check.cmake 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # ---------------------------------
  2. # Finds CEGUI & Ogre toolkit
  3. #
  4. # Should only be used to check the presence, include later
  5. #
  6. # ---------------------------------
  7. GET_PROPERTY(OV_PRINTED GLOBAL PROPERTY OV_TRIED_ThirdPartyCEGUI_Check)
  8. IF(OV_DISABLE_OGRE)
  9. OV_PRINT(OV_PRINTED " SKIPPED Ogre3D/OIS (CEGUI), disabled, no 3D ...")
  10. RETURN()
  11. ENDIF(OV_DISABLE_OGRE)
  12. OV_PRINT(OV_PRINTED " Checking for CEGUI ...")
  13. IF(WIN32)
  14. FIND_PATH(PATH_CEGUI cegui/include/CEGUI.h PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES cegui)
  15. IF(PATH_CEGUI)
  16. SET(CEGUI_FOUND TRUE)
  17. ELSE()
  18. OV_PRINT(OV_PRINTED " CEGUI headers not found ...")
  19. ENDIF()
  20. FIND_PATH(PATH_Ogre3D include/OGRE/Ogre.h PATHS ${LIST_DEPENDENCIES_PATH} $ENV{OGRE_HOME} PATH_SUFFIXES . ogre)
  21. IF(PATH_Ogre3D)
  22. SET(OgreCEGUIRenderer_FOUND TRUE)
  23. ELSE()
  24. OV_PRINT(OV_PRINTED " Ogre materials not found ...")
  25. ENDIF()
  26. ENDIF(WIN32)
  27. IF(UNIX)
  28. INCLUDE("FindPkgConfig")
  29. SET(CEGUI_FOUND "-NOTFOUND")
  30. pkg_check_modules(CEGUI QUIET CEGUI)
  31. IF(NOT CEGUI_FOUND)
  32. # we have this mess as the cegui filenames & paths are different on Fedora 21 at least,
  33. # and the include_dirs doesn't contain the CEGUI/ part ... I'd put that to the .h/.cpp IF the same path
  34. # convention was the case on all platforms... but it is not
  35. pkg_check_modules(CEGUI QUIET CEGUI-0)
  36. SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
  37. ENDIF(NOT CEGUI_FOUND)
  38. SET(OgreCEGUIRenderer_FOUND "-NOTFOUND")
  39. pkg_check_modules(OgreCEGUIRenderer QUIET CEGUI-OGRE)
  40. IF(NOT OgreCEGUIRenderer_FOUND)
  41. pkg_check_modules(OgreCEGUIRenderer QUIET CEGUI-0-OGRE)
  42. ENDIF(NOT OgreCEGUIRenderer_FOUND)
  43. ENDIF(UNIX)
  44. # IF(CEGUI_FOUND AND OgreCEGUIRenderer_FOUND)
  45. # OV_PRINT(OV_PRINTED " Found CEGUI/OgreCEGUIRenderer...")
  46. # ELSE(CEGUI_FOUND AND OgreCEGUIRenderer_FOUND)
  47. # OV_PRINT(OV_PRINTED " FAILED to find CEGUI/OgreCEGUIRenderer...")
  48. # ENDIF(CEGUI_FOUND AND OgreCEGUIRenderer_FOUND)
  49. SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyCEGUI_Check "Yes")