Changeset 2616 for code/branches/buildsystem2/cmake/LibraryConfig.cmake
- Timestamp:
- Jan 29, 2009, 10:55:29 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2/cmake/LibraryConfig.cmake
r2615 r2616 3 3 INCLUDE(LibraryConfigTardis) 4 4 5 # Performs the search and sets the variables 5 ############### Library finding ################# 6 # Performs the search and sets the variables # 6 7 7 # Expand the next statement if newer boost versions than 1.36.1 are released 8 SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0 CACHE STRING "") 9 FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem) 10 # With MSVC, automatic linking is performed for boost. So wee need to tell 11 # the linker where to find them. Also note that when running FindBoost for the 12 # first time, it will set ${Boost_LIBRARIES} to "" but afterwards to the libs. 13 IF (MSVC) 14 LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) 15 ENDIF (MSVC) 16 FIND_PACKAGE(OGRE REQUIRED) 17 FIND_PACKAGE(CEGUI REQUIRED) 18 FIND_PACKAGE(ENet REQUIRED) 19 FIND_PACKAGE(OpenAL REQUIRED) 20 FIND_PACKAGE(ALUT REQUIRED) 21 FIND_PACKAGE(OggVorbis REQUIRED) 22 FIND_PACKAGE(ZLIB REQUIRED) 23 FIND_PACKAGE(DirectX REQUIRED) 8 FIND_PACKAGE(OGRE 1.4 EXACT REQUIRED) 9 FIND_PACKAGE(ENet 1.1 REQUIRED) 10 FIND_PACKAGE(Ogg REQUIRED) 11 FIND_PACKAGE(Vorbis REQUIRED) 12 FIND_PACKAGE(ALUT REQUIRED) 13 FIND_PACKAGE(ZLIB REQUIRED) 14 IF(WIN32) 15 FIND_PACKAGE(DirectX REQUIRED) 16 ENDIF(WIN32) 17 18 ##### CEGUI ##### 19 # We make use of the CEGUI script module called CEGUILua. 20 # However there is a small issue with that: We use Tolua, a C++ binding 21 # generator ourselves. And we also have to use our bindings in the same 22 # lua state is CEGUILua's. Unfortunately this implies that both lua runtime 23 # version are equal or else you get segmentation faults. 24 # In order to match the Lua versions we decided to ship CEGUILua in our 25 # repository, mainly because there is no way to determine which version of 26 # Lua CEGUILua was linked against (you'd have to specify yourself) and secondly 27 # because we can then choose the Lua version. Future plans might involve only 28 # accepting Lua 5.1. 29 30 # Insert all internally supported CEGUILua versions here 31 SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2) 32 OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF) 33 FIND_PACKAGE(CEGUI 0.5 REQUIRED) 24 34 25 35 ##### Lua ##### … … 36 46 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED) 37 47 38 # QUIET: Don't require the whole tcl rat tail 39 FIND_PACKAGE(TCL QUIET) 40 IF(NOT TCL_FOUND) 41 MESSAGE(FATAL_ERROR "Tcl was not found.") 42 ENDIF(NOT TCL_FOUND) 43 44 # Hide variables created by CMake FindXX scripts 48 ##### OpenAL ##### 49 FIND_PACKAGE(OpenAL REQUIRED) 50 # ALUT's headers include openal headers, but like <AL/al.h>, not <al.h> 51 # Unfortunately this is not the case on all systems, so FindOpenAL.cmake 52 # specifies the directory/AL, which now causes problems with ALUT. 53 IF(DEFINED OPENAL_FOUND_FIRST_TIME) 54 SET(OPENAL_FOUND_FIRST_TIME FALSE CACHE INTERNAL "") 55 ELSE(DEFINED OPENAL_FOUND_FIRST_TIME) 56 SET(OPENAL_FOUND_FIRST_TIME TRUE CACHE INTERNAL "") 57 STRING(REGEX REPLACE "^(.*)/AL$" "\\1" _openal_dir_2 ${OPENAL_INCLUDE_DIR}) 58 IF(_openal_dir_2) 59 SET(OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} ${_openal_dir_2} CACHE STRING "" FORCE) 60 ENDIF(_openal_dir_2) 61 ENDIF(DEFINED OPENAL_FOUND_FIRST_TIME) 62 # Hide variables created by the script 45 63 MARK_AS_ADVANCED( 46 LUA_LIBRARY_lua47 LUA_LIBRARY_lualib48 64 OPENAL_INCLUDE_DIR 49 65 OPENAL_LIBRARY 50 66 ) 67 68 ##### TCL ##### 69 # We only require TCL, so avoid confusing user about other TCL stuff by 70 # applying a little workaround 71 SET(Tclsh_FIND_QUIETLY TRUE) 72 FIND_PACKAGE(TCL 8.4 REQUIRED QUIET) 73 # Display messages separately 74 SET(TCL_FIND_QUIETLY FALSE) 75 FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH) 76 # Workaround a CMake bug that doesn't set the variables to the cache 77 # Occurs at least on CMake 2.6.2 and 2.6.0 under Windows 78 SET(TCL_LIBRARY ${TCL_LIBRARY} CACHE FILEPATH "") 79 SET(TCL_INCLUDE_PATH ${TCL_INCLUDE_PATH} CACHE PATH "") 80 81 ##### Boost ##### 82 # Expand the next statement if newer boost versions than 1.36.1 are released 83 SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0) 84 FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem) 85 # With MSVC, automatic linking is performed for boost. So wee need to tell 86 # the linker where to find them. Also note that when running FindBoost for the 87 # first time, it will set ${Boost_LIBRARIES} to "" but afterwards to the libs. 88 IF (MSVC) 89 # Little bit hacky, but Boost_LIBRARY_DIRS doesn't get set right when having 90 # debug and optimized libraries. 91 GET_FILENAME_COMPONENT(BOOST_LINK_DIR "${Boost_THREAD_LIBRARY_RELEASE}" PATH) 92 LINK_DIRECTORIES(${BOOST_LINK_DIR}) 93 ENDIF (MSVC)
Note: See TracChangeset
for help on using the changeset viewer.