Changeset 7960 for code/branches/kicklib/cmake/tools/FindCEGUI.cmake
- Timestamp:
- Feb 25, 2011, 3:07:17 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib/cmake/tools/FindCEGUI.cmake
r7941 r7960 26 26 # > www.orxonox.net < 27 27 28 INCLUDE(CompareVersionStrings) 28 29 INCLUDE(DetermineVersion) 29 30 INCLUDE(FindPackageHandleAdvancedArgs) 30 31 INCLUDE(HandleLibraryTypes) 31 32 32 # Find CEGUI library33 # Find headers 33 34 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h 34 35 PATHS $ENV{CEGUIDIR} 35 36 PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers 36 37 ) 38 39 # Inspect CEGUIVersion.h for the version number 40 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) 41 42 # Find CEGUI library 37 43 FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED 38 44 NAMES CEGUIBase CEGUI … … 72 78 ) 73 79 74 # Inspect CEGUIVersion.h for the version number 75 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) 80 # Newer versions of CEGUI have the renderer for OGRE shipped with them 81 COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_compare TRUE) 82 IF(_version_compare GREATER -1) 83 # Find CEGUI OGRE Renderer libraries 84 FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED 85 NAMES CEGUIOgreRenderer 86 PATHS $ENV{CEGUIDIR} 87 PATH_SUFFIXES lib bin 88 ) 89 FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_DEBUG 90 NAMES CEGUIOgreRendererd CEGUIOgreRenderer_d 91 PATHS $ENV{CEGUIDIR} 92 PATH_SUFFIXES lib bin 93 ) 94 SET(CEGUI_OGRE_RENDERER_LIBRARY_NAME CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED) 95 ELSE() 96 SET(CEGUI_OGRE_RENDERER_BUILD_REQUIRED TRUE) 97 ENDIF() 76 98 77 99 # Handle the REQUIRED argument and set CEGUI_FOUND … … 82 104 CEGUILUA_LIBRARY_OPTIMIZED 83 105 CEGUI_TOLUA_LIBRARY_OPTIMIZED 106 ${CEGUI_OGRE_RENDERER_LIBRARY_NAME} 84 107 ) 85 108 … … 88 111 HANDLE_LIBRARY_TYPES(CEGUILUA) 89 112 HANDLE_LIBRARY_TYPES(CEGUI_TOLUA) 113 IF(NOT CEGUI_OGRE_RENDERER_BUILD_REQUIRED) 114 HANDLE_LIBRARY_TYPES(CEGUI_OGRE_RENDERER) 115 ENDIF() 90 116 91 117 MARK_AS_ADVANCED( … … 97 123 CEGUI_TOLUA_LIBRARY_OPTIMIZED 98 124 CEGUI_TOLUA_LIBRARY_DEBUG 125 CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED 126 CEGUI_OGRE_RENDERER_LIBRARY_DEBUG 99 127 )
Note: See TracChangeset
for help on using the changeset viewer.