Changeset 7941 for code/branches/kicklib/cmake
- Timestamp:
- Feb 20, 2011, 10:49:06 PM (14 years ago)
- Location:
- code/branches/kicklib/cmake
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib/cmake/LibraryConfig.cmake
r7459 r7941 109 109 ##### CEGUI ##### 110 110 # We make use of the CEGUI script module called CEGUILua. 111 # However there is a small issue with that: We use Tolua, a C++ binding 112 # generator ourselves. And we also have to use our bindings in the same 113 # lua state is CEGUILua's. Unfortunately this implies that both lua runtime 114 # version are equal or else you get segmentation faults. 115 # In order to match the Lua versions we decided to ship CEGUILua in our 116 # repository, mainly because there is no way to determine which version of 117 # Lua CEGUILua was linked against (you'd have to specify yourself) and secondly 118 # because we can then choose the Lua version. Future plans might involve only 119 # accepting Lua 5.1. 120 121 # Insert all internally supported CEGUILua versions here 122 SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2) 123 OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF) 111 # However there is a small issue with that: Both CEGUILua and Orxonox use 112 # Lua library functions on the same objects. And it turns out that in this case 113 # the linked library must be EXACTLY the same. 114 # That means for us we have to find the Lua library that CEGUI was 115 # linked against if we don't use a dependency package. 116 124 117 FIND_PACKAGE(CEGUI 0.5 REQUIRED) 125 118 126 119 ##### Lua ##### 127 IF(CEGUILUA_USE_EXTERNAL_LIBRARY) 128 COMPARE_VERSION_STRINGS(${CEGUI_VERSION} "0.6" _version_comparison) 129 IF(version_comparison LESS 0) 130 SET(LUA_VERSION_REQUEST 5.0) 131 ELSE() 132 SET(LUA_VERSION_REQUEST 5.1) 133 ENDIF() 120 IF(NOT LUA_VERSION_REQUIREMENT) 121 FIND_PACKAGE(Lua 5 REQUIRED) 134 122 ELSE() 135 SET(LUA_VERSION_REQUEST 5) 136 ENDIF() 137 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED) 123 FIND_PACKAGE(Lua ${LUA_VERSION_REQUIREMENT} EXACT REQUIRED) 124 ENDIF() 138 125 139 126 ##### OpenAL ##### -
code/branches/kicklib/cmake/tools/FindCEGUI.cmake
r7163 r7941 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 … … 33 30 INCLUDE(HandleLibraryTypes) 34 31 32 # Find CEGUI library 35 33 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h 36 34 PATHS $ENV{CEGUIDIR} … … 50 48 ) 51 49 50 # Find CEGUILua libraries 51 FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED 52 NAMES CEGUILua CEGUILuaScriptModule 53 PATHS $ENV{CEGUIDIR} 54 PATH_SUFFIXES lib bin 55 ) 56 FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG 57 NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d 58 PATHS $ENV{CEGUIDIR} 59 PATH_SUFFIXES lib bin 60 ) 61 62 # Find CEGUI Tolua++ libraries 63 FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED 64 NAMES CEGUItoluapp tolua++ 65 PATHS $ENV{CEGUIDIR} 66 PATH_SUFFIXES lib bin 67 ) 68 FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG 69 NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d 70 PATHS $ENV{CEGUIDIR} 71 PATH_SUFFIXES lib bin 72 ) 73 52 74 # Inspect CEGUIVersion.h for the version number 53 75 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) … … 56 78 # Also checks the version requirements if given 57 79 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}" 80 CEGUI_INCLUDE_DIR 58 81 CEGUI_LIBRARY_OPTIMIZED 59 CEGUI_INCLUDE_DIR 82 CEGUILUA_LIBRARY_OPTIMIZED 83 CEGUI_TOLUA_LIBRARY_OPTIMIZED 60 84 ) 61 85 62 86 # Collect optimized and debug libraries 63 87 HANDLE_LIBRARY_TYPES(CEGUI) 88 HANDLE_LIBRARY_TYPES(CEGUILUA) 89 HANDLE_LIBRARY_TYPES(CEGUI_TOLUA) 64 90 65 91 MARK_AS_ADVANCED( … … 67 93 CEGUI_LIBRARY_OPTIMIZED 68 94 CEGUI_LIBRARY_DEBUG 95 CEGUILUA_LIBRARY_OPTIMIZED 96 CEGUILUA_LIBRARY_DEBUG 97 CEGUI_TOLUA_LIBRARY_OPTIMIZED 98 CEGUI_TOLUA_LIBRARY_DEBUG 69 99 ) 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.