Changeset 8283 for code/branches/kicklib2/cmake/tools
- Timestamp:
- Apr 21, 2011, 6:32:28 PM (14 years ago)
- Location:
- code/branches/kicklib2
- Files:
-
- 1 deleted
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib2
- Property svn:mergeinfo changed
/code/branches/kicklib merged: 7940-7948,7950-7951,7953,7956-7957,7959-7961,7964-7965,7967-7969,7971,7973-7974
- Property svn:mergeinfo changed
-
code/branches/kicklib2/cmake/tools/FindCEGUI.cmake
r7163 r8283 4 4 # CEGUI_INCLUDE_DIR 5 5 # CEGUI_LIBRARY, the library to link against to use CEGUI. 6 # CEGUILUA_LIBRARY, the library to link against to use the CEGUI script module. 7 # CEGUI_TOLUA_LIBRARY, the library to link against to use Tolua++. 6 8 # CEGUI_FOUND, If false, do not try to use CEGUI 7 9 # CEGUI_VERSION, the version as string "x.y.z" 8 # CEGUILUA_LIBRARY, Script module library9 # CEGUILUA_USE_INTERNAL_LIBRARY, True if CEGUILUA_LIBRARY was not defined here10 10 # 11 11 # Input: 12 12 # ENV{CEGUIDIR}, CEGUI path, optional 13 # FIND CEGUILUA_INTERNAL_SUPPORT, List of all CEGUILua version supported14 # in the source repository15 # CEGUILUA_USE_EXTERNAL_LIBRARY, Force finding of CEGUILua16 13 # 17 14 # Created by Matt Williams to find OGRE libraries … … 29 26 # > www.orxonox.net < 30 27 28 INCLUDE(CompareVersionStrings) 31 29 INCLUDE(DetermineVersion) 32 30 INCLUDE(FindPackageHandleAdvancedArgs) 33 31 INCLUDE(HandleLibraryTypes) 34 32 33 # Find headers 35 34 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h 36 35 PATHS $ENV{CEGUIDIR} 37 36 PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers 38 37 ) 38 39 # Inspect CEGUIVersion.h for the version number 40 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) 41 42 # Find CEGUI library 39 43 FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED 40 44 NAMES CEGUIBase CEGUI … … 50 54 ) 51 55 52 # Inspect CEGUIVersion.h for the version number 53 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) 56 # Find CEGUILua libraries 57 FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED 58 NAMES CEGUILua CEGUILuaScriptModule 59 PATHS $ENV{CEGUIDIR} 60 PATH_SUFFIXES lib bin 61 ) 62 FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG 63 NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d 64 PATHS $ENV{CEGUIDIR} 65 PATH_SUFFIXES lib bin 66 ) 67 68 # Find CEGUI Tolua++ libraries 69 FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED 70 NAMES CEGUItoluapp tolua++ 71 PATHS $ENV{CEGUIDIR} 72 PATH_SUFFIXES lib bin 73 ) 74 FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG 75 NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d 76 PATHS $ENV{CEGUIDIR} 77 PATH_SUFFIXES lib bin 78 ) 79 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() 54 98 55 99 # Handle the REQUIRED argument and set CEGUI_FOUND 56 100 # Also checks the version requirements if given 57 101 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}" 102 CEGUI_INCLUDE_DIR 58 103 CEGUI_LIBRARY_OPTIMIZED 59 CEGUI_INCLUDE_DIR 104 CEGUILUA_LIBRARY_OPTIMIZED 105 CEGUI_TOLUA_LIBRARY_OPTIMIZED 106 ${CEGUI_OGRE_RENDERER_LIBRARY_NAME} 60 107 ) 61 108 62 109 # Collect optimized and debug libraries 63 110 HANDLE_LIBRARY_TYPES(CEGUI) 111 HANDLE_LIBRARY_TYPES(CEGUILUA) 112 HANDLE_LIBRARY_TYPES(CEGUI_TOLUA) 113 IF(NOT CEGUI_OGRE_RENDERER_BUILD_REQUIRED) 114 HANDLE_LIBRARY_TYPES(CEGUI_OGRE_RENDERER) 115 ENDIF() 64 116 65 117 MARK_AS_ADVANCED( … … 67 119 CEGUI_LIBRARY_OPTIMIZED 68 120 CEGUI_LIBRARY_DEBUG 121 CEGUILUA_LIBRARY_OPTIMIZED 122 CEGUILUA_LIBRARY_DEBUG 123 CEGUI_TOLUA_LIBRARY_OPTIMIZED 124 CEGUI_TOLUA_LIBRARY_DEBUG 125 CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED 126 CEGUI_OGRE_RENDERER_LIBRARY_DEBUG 69 127 ) 70 71 LIST(FIND CEGUILUA_INTERNAL_SUPPORT "${CEGUI_VERSION}" _find_result)72 IF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)73 # Also try to find the CEGUILua libraries.74 # There would already be libraries in src/ for versions 0.5 and 0.675 FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED76 NAMES CEGUILua77 PATHS $ENV{CEGUIDIR}78 PATH_SUFFIXES lib bin79 )80 FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG81 NAMES CEGUILuad CEGUILua_d82 PATHS $ENV{CEGUIDIR}83 PATH_SUFFIXES lib bin84 )85 86 SET(CEGUILua_FIND_REQUIRED ${CEGUI_FIND_REQUIRED})87 # Handle the REQUIRED argument and set CEGUILUA_FOUND88 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUILua DEFAULT_MSG89 CEGUILUA_LIBRARY_OPTIMIZED90 )91 92 # Collect optimized and debug libraries93 HANDLE_LIBRARY_TYPES(CEGUILUA)94 95 MARK_AS_ADVANCED(96 CEGUILUA_LIBRARY_OPTIMIZED97 CEGUILUA_LIBRARY_DEBUG98 )99 100 ELSE(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)101 SET(CEGUILUA_USE_INTERNAL_LIBRARY TRUE)102 ENDIF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)103
Note: See TracChangeset
for help on using the changeset viewer.