Changeset 7421 for sandbox_qt/cmake/LibraryConfig.cmake
- Timestamp:
- Sep 12, 2010, 12:47:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox_qt/cmake/LibraryConfig.cmake
r7243 r7421 40 40 # On Windows using a package causes way less problems 41 41 SET(_option_msg "Set this to true to use precompiled dependecy archives") 42 IF(WIN32) 43 OPTION(DEPENDENCY_PACKAGE_ENABLE "${_option_msg}" ON) 44 ELSE(WIN32) 45 OPTION(DEPENDENCY_PACKAGE_ENABLE "${_option_msg}" FALSE) 46 ENDIF(WIN32) 42 OPTION(DEPENDENCY_PACKAGE_ENABLE "${_option_msg}" FALSE) 47 43 48 44 # Scripts for specific library and CMake config 49 45 INCLUDE(LibraryConfigTardis) 50 INCLUDE(LibraryConfigApple)51 46 52 47 IF(DEPENDENCY_PACKAGE_ENABLE) … … 93 88 # Performs the search and sets the variables # 94 89 95 FIND_PACKAGE(OGRE 1.4 REQUIRED) 96 FIND_PACKAGE(ENet 1.1 REQUIRED) 97 FIND_PACKAGE(Ogg REQUIRED) 98 FIND_PACKAGE(Vorbis REQUIRED) 99 FIND_PACKAGE(ALUT REQUIRED) 100 FIND_PACKAGE(ZLIB REQUIRED) 101 IF(POCO_REQUIRED) 102 FIND_PACKAGE(POCO REQUIRED) 103 ENDIF() 104 IF(WIN32) 105 FIND_PACKAGE(DirectX REQUIRED) 106 ENDIF() 107 108 ##### CEGUI ##### 109 # We make use of the CEGUI script module called CEGUILua. 110 # However there is a small issue with that: We use Tolua, a C++ binding 111 # generator ourselves. And we also have to use our bindings in the same 112 # lua state is CEGUILua's. Unfortunately this implies that both lua runtime 113 # version are equal or else you get segmentation faults. 114 # In order to match the Lua versions we decided to ship CEGUILua in our 115 # repository, mainly because there is no way to determine which version of 116 # Lua CEGUILua was linked against (you'd have to specify yourself) and secondly 117 # because we can then choose the Lua version. Future plans might involve only 118 # accepting Lua 5.1. 119 120 # Insert all internally supported CEGUILua versions here 121 SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2) 122 OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF) 123 FIND_PACKAGE(CEGUI 0.5 REQUIRED) 124 125 ##### Lua ##### 126 IF(CEGUILUA_USE_EXTERNAL_LIBRARY) 127 COMPARE_VERSION_STRINGS(${CEGUI_VERSION} "0.6" _version_comparison) 128 IF(version_comparison LESS 0) 129 SET(LUA_VERSION_REQUEST 5.0) 130 ELSE() 131 SET(LUA_VERSION_REQUEST 5.1) 132 ENDIF() 133 ELSE() 134 SET(LUA_VERSION_REQUEST 5) 135 ENDIF() 136 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED) 137 138 ##### OpenAL ##### 139 FIND_PACKAGE(OpenAL REQUIRED) 140 # Also use parent include dir (without AL/) for ALUT 141 IF(OPENAL_INCLUDE_DIR MATCHES "/AL$") 142 GET_FILENAME_COMPONENT(ALT_OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} PATH) 143 ENDIF() 144 SET(OPENAL_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR} ${ALT_OPENAL_INCLUDE_DIR}) 145 # Notfiy user 146 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR) 147 # Hide variables created by the script 148 MARK_AS_ADVANCED(OPENAL_INCLUDE_DIR OPENAL_LIBRARY) 149 150 ##### Tcl ##### 151 # We only require Tcl, so avoid confusing user about other Tcl stuff by 152 # applying a little workaround 153 SET(Tclsh_FIND_QUIETLY TRUE) 154 FIND_PACKAGE(TCL QUIET) 155 # Display messages separately 156 SET(TCL_FIND_QUIETLY FALSE) 157 FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH) 158 159 ##### Boost ##### 160 # Expand the next statement if newer boost versions than 1.36.1 are released 161 SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0 1.38 1.38.0 1.39 1.39.0 1.40 1.40.0 162 1.41 1.41.0 1.42 1.42.0 1.43 1.43.0 1.44 1.44.0) 163 IF( NOT TARDIS ) 164 FIND_PACKAGE(Boost 1.35 REQUIRED thread filesystem system date_time) 165 ENDIF() 166 # No auto linking, so this option is useless anyway 167 MARK_AS_ADVANCED(Boost_LIB_DIAGNOSTIC_DEFINITIONS) 90 FIND_PACKAGE(QT4 COMPONENTS QtCore QtGui REQUIRED) 168 91 169 92 … … 174 97 # Note: Default option in the libraries vary, but our default option is dynamic 175 98 IF(WIN32) 176 OPTION(LINK_BOOST_DYNAMIC "Link Boost dynamically on Windows" TRUE) 177 OPTION(LINK_CEGUI_DYNAMIC "Link CEGUI dynamicylly on Windows" TRUE) 178 OPTION(LINK_ENET_DYNAMIC "Link ENet dynamically on Windows" TRUE) 179 OPTION(LINK_OGRE_DYNAMIC "Link OGRE dynamically on Windows" TRUE) 180 OPTION(LINK_TCL_DYNAMIC "Link TCL dynamically on Windows" TRUE) 181 OPTION(LINK_ZLIB_DYNAMIC "Link ZLib dynamically on Windows" TRUE) 182 COMPARE_VERSION_STRINGS("${LUA_VERSION}" "5.1" _version_comparison) 183 IF(_version_comparison LESS 0) 184 OPTION(LINK_LUA_DYNAMIC "Link Lua dynamically on Windows" FALSE) 185 ELSE(_version_comparison LESS 0) 186 OPTION(LINK_LUA_DYNAMIC "Link Lua dynamically on Windows" TRUE) 187 ENDIF(_version_comparison LESS 0) 99 #OPTION(LINK_ZLIB_DYNAMIC "Link ZLib dynamically on Windows" TRUE) 188 100 189 101 IF(DEPENDENCY_PACKAGE_ENABLE) 190 MARK_AS_ADVANCED( 191 LINK_BOOST_DYNAMIC LINK_CEGUI_DYNAMIC LINK_ENET_DYNAMIC 192 LINK_OGRE_DYNAMIC LINK_TCL_DYNAMIC LINK_ZLIB_DYNAMIC 193 LINK_LUA_DYNAMIC 194 ) 102 #MARK_AS_ADVANCED( 103 #LINK_ZLIB_DYNAMIC 104 #) 195 105 ENDIF() 196 106 ENDIF(WIN32) 197 198 199 ################# OGRE Plugins ##################200 201 # More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager202 SET(OGRE_PLUGINS_INT Plugin_ParticleFX)203 IF(WIN32)204 # CG program manager is probably DirectX related (not available under unix)205 LIST(APPEND OGRE_PLUGINS_INT Plugin_CgProgramManager)206 ENDIF(WIN32)207 SET(OGRE_PLUGINS ${OGRE_PLUGINS_INT} CACHE STRING208 "Specify which OGRE plugins to load. Existance check is performed.")209 210 # Check the plugins and determine the plugin folder211 # You can give a hint by setting the environment variable ENV{OGRE_PLUGIN_DIR}212 INCLUDE(CheckOGREPlugins)213 CHECK_OGRE_PLUGINS(${OGRE_PLUGINS})214
Note: See TracChangeset
for help on using the changeset viewer.