1 | INCLUDE(LibraryConfigMinGW) |
---|
2 | INCLUDE(LibraryConfigMSVC) |
---|
3 | INCLUDE(LibraryConfigTardis) |
---|
4 | |
---|
5 | # Performs the search and sets the variables |
---|
6 | |
---|
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) |
---|
24 | |
---|
25 | # Require Lua 5.0 or 5.1 |
---|
26 | FIND_PACKAGE(Lua50 QUIET) |
---|
27 | IF(NOT LUA50_FOUND) |
---|
28 | # Remove variables set by Lua50 and try with Lua51 |
---|
29 | SET(LUA_INCLUDE_DIR) |
---|
30 | SET(LUA_LIBRARY_lua) |
---|
31 | SET(LUA_LIBRARY_lualib) |
---|
32 | SET(LUA_LIBRARIES) |
---|
33 | FIND_PACKAGE(Lua51 REQUIRED) |
---|
34 | ENDIF(NOT LUA50_FOUND) |
---|
35 | # Determine Lua version (Lua50 may also find Lua51) |
---|
36 | FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" LUA_VERSION REGEX "LUA_VERSION") |
---|
37 | STRING(REGEX REPLACE "^.*\"Lua (.*)\".*$" "\\1" LUA_VERSION "${LUA_VERSION}") |
---|
38 | |
---|
39 | # QUIET: Don't require the whole tcl rat tail |
---|
40 | FIND_PACKAGE(TCL QUIET) |
---|
41 | IF(NOT TCL_FOUND) |
---|
42 | MESSAGE(FATAL_ERROR "Tcl was not found.") |
---|
43 | ENDIF(NOT TCL_FOUND) |
---|
44 | |
---|
45 | # Hide variables created by CMake FindXX scripts |
---|
46 | MARK_AS_ADVANCED( |
---|
47 | LUA_LIBRARY_lua |
---|
48 | LUA_LIBRARY_lualib |
---|
49 | OPENAL_INCLUDE_DIR |
---|
50 | OPENAL_LIBRARY |
---|
51 | ) |
---|