Changeset 5782 for sandbox/cmake/LibraryConfig.cmake
- Timestamp:
- Sep 24, 2009, 11:32:39 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/cmake/LibraryConfig.cmake
r5695 r5782 48 48 # Scripts for specific library and CMake config 49 49 INCLUDE(LibraryConfigTardis) 50 INCLUDE(LibraryConfigApple)51 50 52 51 IF(DEPENDENCY_PACKAGE_ENABLE) … … 71 70 ENDIF(DEPENDENCY_PACKAGE_ENABLE) 72 71 73 # User script74 SET(LIBRARY_CONFIG_USER_SCRIPT "" CACHE FILEPATH75 "Specify a CMake script if you wish to write your own library path config.76 See LibraryConfigTardis.cmake for an example.")77 IF(LIBRARY_CONFIG_USER_SCRIPT)78 IF(EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})79 INCLUDE(${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})80 ENDIF()81 ENDIF(LIBRARY_CONFIG_USER_SCRIPT)82 83 84 72 ############### Library finding ################# 85 73 # Performs the search and sets the variables # 86 74 87 75 FIND_PACKAGE(OGRE 1.4 REQUIRED) 88 FIND_PACKAGE(ENet 1.1 REQUIRED)89 FIND_PACKAGE(Ogg REQUIRED)90 FIND_PACKAGE(Vorbis REQUIRED)91 FIND_PACKAGE(ALUT REQUIRED)92 FIND_PACKAGE(ZLIB REQUIRED)93 IF(WIN32)94 FIND_PACKAGE(DirectX REQUIRED)95 ENDIF(WIN32)96 97 ##### CEGUI #####98 # We make use of the CEGUI script module called CEGUILua.99 # However there is a small issue with that: We use Tolua, a C++ binding100 # generator ourselves. And we also have to use our bindings in the same101 # lua state is CEGUILua's. Unfortunately this implies that both lua runtime102 # version are equal or else you get segmentation faults.103 # In order to match the Lua versions we decided to ship CEGUILua in our104 # repository, mainly because there is no way to determine which version of105 # Lua CEGUILua was linked against (you'd have to specify yourself) and secondly106 # because we can then choose the Lua version. Future plans might involve only107 # accepting Lua 5.1.108 109 # Insert all internally supported CEGUILua versions here110 SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2)111 OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF)112 FIND_PACKAGE(CEGUI 0.5 REQUIRED)113 114 76 ##### Lua ##### 115 77 IF(CEGUILUA_USE_EXTERNAL_LIBRARY) … … 124 86 ENDIF() 125 87 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED) 126 127 ##### OpenAL #####128 FIND_PACKAGE(OpenAL REQUIRED)129 # Also use parent include dir (without AL/) for ALUT130 IF(OPENAL_INCLUDE_DIR MATCHES "/AL$")131 GET_FILENAME_COMPONENT(ALT_OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} PATH)132 ENDIF()133 SET(OPENAL_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR} ${ALT_OPENAL_INCLUDE_DIR})134 # Notfiy user135 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)136 # Hide variables created by the script137 MARK_AS_ADVANCED(OPENAL_INCLUDE_DIR OPENAL_LIBRARY)138 139 ##### Tcl #####140 # We only require Tcl, so avoid confusing user about other Tcl stuff by141 # applying a little workaround142 SET(Tclsh_FIND_QUIETLY TRUE)143 FIND_PACKAGE(TCL QUIET)144 # Display messages separately145 SET(TCL_FIND_QUIETLY FALSE)146 FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)147 88 148 89 ##### Boost ##### … … 161 102 IF(WIN32) 162 103 OPTION(LINK_BOOST_DYNAMIC "Link Boost dynamically on Windows" TRUE) 163 OPTION(LINK_CEGUI_DYNAMIC "Link CEGUI dynamicylly on Windows" TRUE)164 OPTION(LINK_ENET_DYNAMIC "Link ENet dynamically on Windows" TRUE)165 104 OPTION(LINK_OGRE_DYNAMIC "Link OGRE dynamically on Windows" TRUE) 166 OPTION(LINK_TCL_DYNAMIC "Link TCL dynamically on Windows" TRUE)167 OPTION(LINK_ZLIB_DYNAMIC "Link ZLib dynamically on Windows" TRUE)168 105 COMPARE_VERSION_STRINGS("${LUA_VERSION}" "5.1" _version_comparison) 169 106 IF(_version_comparison LESS 0) … … 175 112 IF(DEPENDENCY_PACKAGE_ENABLE) 176 113 MARK_AS_ADVANCED( 177 LINK_BOOST_DYNAMIC LINK_CEGUI_DYNAMIC LINK_ENET_DYNAMIC178 LINK_OGRE_DYNAMIC LINK_TCL_DYNAMIC LINK_ZLIB_DYNAMIC114 LINK_BOOST_DYNAMIC 115 LINK_OGRE_DYNAMIC 179 116 LINK_LUA_DYNAMIC 180 117 ) 181 118 ENDIF() 182 119 ENDIF(WIN32) 183 184 185 ################# OGRE Plugins ##################186 187 # More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager188 SET(OGRE_PLUGINS_INT Plugin_ParticleFX)189 IF(WIN32)190 # CG program manager is probably DirectX related (not available under unix)191 LIST(APPEND OGRE_PLUGINS_INT Plugin_CgProgramManager)192 ENDIF(WIN32)193 SET(OGRE_PLUGINS ${OGRE_PLUGINS_INT} CACHE STRING194 "Specify which OGRE plugins to load. Existance check is performed.")195 196 # Check the plugins and determine the plugin folder197 # You can give a hint by setting the environment variable ENV{OGRE_PLUGIN_DIR}198 INCLUDE(CheckOGREPlugins)199 CHECK_OGRE_PLUGINS(${OGRE_PLUGINS})200
Note: See TracChangeset
for help on using the changeset viewer.