[2579] | 1 | # |
---|
| 2 | # ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | # > www.orxonox.net < |
---|
| 4 | # |
---|
| 5 | # |
---|
| 6 | # License notice: |
---|
| 7 | # |
---|
| 8 | # This program is free software; you can redistribute it and/or |
---|
| 9 | # modify it under the terms of the GNU General Public License |
---|
| 10 | # as published by the Free Software Foundation; either version 2 |
---|
| 11 | # of the License, or (at your option) any later version. |
---|
| 12 | # |
---|
| 13 | # This program is distributed in the hope that it will be useful, |
---|
| 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | # GNU General Public License for more details. |
---|
| 17 | # |
---|
| 18 | # You should have received a copy of the GNU General Public License |
---|
| 19 | # along with this program; if not, write to the Free Software |
---|
| 20 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | # |
---|
| 22 | # Author: |
---|
| 23 | # Reto Grieder |
---|
| 24 | # Co-authors: |
---|
| 25 | # ... |
---|
| 26 | # |
---|
| 27 | |
---|
[2588] | 28 | ###################### MSVC config ######################## |
---|
| 29 | # Set the library directories and special options when |
---|
| 30 | # using Visual Studio. |
---|
| 31 | ########################################################### |
---|
[2579] | 32 | |
---|
| 33 | IF (MSVC) |
---|
[2582] | 34 | MESSAGE(STATUS "Running on MSVC. Using customized paths and options.") |
---|
| 35 | |
---|
[2588] | 36 | ###################### Libraries ######################## |
---|
| 37 | |
---|
[2582] | 38 | # Determine library directory |
---|
| 39 | IF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8) |
---|
| 40 | SET(MSVC_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8") |
---|
| 41 | ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8) |
---|
| 42 | SET(MSVC_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8") |
---|
| 43 | ELSE(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8) |
---|
| 44 | MESSAGE(FATAL_ERROR "Could not find dependency directory for the Visual Studio libraries") |
---|
| 45 | ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8) |
---|
[2590] | 46 | SET(ORXONOX_LIBRARY_BIN_DIR ${MSVC_LIBRARY_DIR}/bin) |
---|
[2579] | 47 | |
---|
[2582] | 48 | # Set variables for the include directories and the libraries |
---|
[2583] | 49 | # Note: When setting ENV${} variables, make sure to use quotes when |
---|
| 50 | # having multiple directories. |
---|
| 51 | SET(ENV{BOOST_ROOT} ${MSVC_LIBRARY_DIR}/boost-1.35.0) |
---|
[2582] | 52 | SET(ENV{CEGUIDIR} ${MSVC_LIBRARY_DIR}/cegui-0.6.1) |
---|
| 53 | SET(ENV{ENETDIR} ${MSVC_LIBRARY_DIR}/enet-1.2) |
---|
| 54 | SET(ENV{ALUTDIR} ${MSVC_LIBRARY_DIR}/freealut-1.1.0) |
---|
| 55 | SET(ENV{OGGDIR} ${MSVC_LIBRARY_DIR}/libogg-1.1.3) |
---|
| 56 | SET(ENV{VORBISDIR} ${MSVC_LIBRARY_DIR}/libvorbis-1.2.0) |
---|
| 57 | SET(ENV{OPENALDIR} ${MSVC_LIBRARY_DIR}/openal-1.1) |
---|
| 58 | SET(ENV{LUA_DIR} ${MSVC_LIBRARY_DIR}/lua-5.1.3) |
---|
[2590] | 59 | SET(ENV{OGRE_HOME} "${MSVC_LIBRARY_DIR}/ogre-1.4.9;${ORXONOX_LIBRARY_BIN_DIR}") |
---|
[2582] | 60 | SET(TCL_INCLUDE_PATH ${MSVC_LIBRARY_DIR}/tcl-8.5.2/include) |
---|
| 61 | SET(TCL_LIBRARY ${MSVC_LIBRARY_DIR}/tcl-8.5.2/lib/tcl85t.lib) |
---|
| 62 | # Do some hacking to avoid "Tclsh not found" message |
---|
| 63 | SET(TCL_TCLSH ${MSVC_LIBRARY_DIR}/tcl-8.5.2/lib/tcl85t.lib) |
---|
| 64 | SET(ZLIB_INCLUDE_DIR ${MSVC_LIBRARY_DIR}/zlib-1.2.3/include) |
---|
[2583] | 65 | SET(ZLIB_LIBRARY optimized ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib.lib |
---|
| 66 | debug ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib_d.lib) |
---|
[2579] | 67 | SET(ZLIB_FOUND TRUE) |
---|
[2582] | 68 | |
---|
[2583] | 69 | ######################### Misc ########################## |
---|
| 70 | |
---|
| 71 | # Set tolua working directory because lua.dll is not where tolua is |
---|
[2590] | 72 | SET(TOLUA_PARSER_WORKING_DIRECTORY ${ORXONOX_LIBRARY_BIN_DIR}) |
---|
[2579] | 73 | ENDIF (MSVC) |
---|