Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/ConfigMSVC.cmake @ 2585

Last change on this file since 2585 was 2585, checked in by rgrieder, 15 years ago

FindOgre now also checks for all the required plugins.
These are specified in cmake/ConfigPlatforms.cmake, however there is only one render system required.
${OGRE_PLUGINS_FOLDER_DEBUG}, ${OGRE_PLUGINS_FOLDER_RELEASE}, ${OGRE_PLUGINS_DEBUG}, ${OGRE_PLUGINS_RELEASE} are also set for later use.

  • Property svn:eol-style set to native
File size: 4.1 KB
Line 
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 
28############## MSVC config ################
29# Set the library directory when using precompiled tarballs for
30# the dependencies under windows (MSVC)
31###########################################
32
33IF (MSVC)
34  MESSAGE(STATUS "Running on MSVC. Using customized paths and options.")
35
36  # Determine library directory
37  IF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)
38    SET(MSVC_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8")
39  ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8)
40    SET(MSVC_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8")
41  ELSE(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)
42    MESSAGE(FATAL_ERROR "Could not find dependency directory for the Visual Studio libraries")
43  ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)
44
45  # Set variables for the include directories and the libraries
46  # Note: When setting ENV${} variables, make sure to use quotes when
47  #       having multiple directories.
48  SET(ENV{BOOST_ROOT}        ${MSVC_LIBRARY_DIR}/boost-1.35.0)
49  SET(ENV{CEGUIDIR}          ${MSVC_LIBRARY_DIR}/cegui-0.6.1)
50  SET(ENV{ENETDIR}           ${MSVC_LIBRARY_DIR}/enet-1.2)
51  SET(ENV{ALUTDIR}           ${MSVC_LIBRARY_DIR}/freealut-1.1.0)
52  SET(ENV{OGGDIR}            ${MSVC_LIBRARY_DIR}/libogg-1.1.3)
53  SET(ENV{VORBISDIR}         ${MSVC_LIBRARY_DIR}/libvorbis-1.2.0)
54  SET(ENV{OPENALDIR}         ${MSVC_LIBRARY_DIR}/openal-1.1)
55  SET(ENV{LUA_DIR}           ${MSVC_LIBRARY_DIR}/lua-5.1.3)
56  SET(ENV{OGRE_HOME}        "${MSVC_LIBRARY_DIR}/ogre-1.4.9;${ORXONOX_LIBRARY_BIN_DIR}")
57  SET(TCL_INCLUDE_PATH       ${MSVC_LIBRARY_DIR}/tcl-8.5.2/include)
58  SET(TCL_LIBRARY            ${MSVC_LIBRARY_DIR}/tcl-8.5.2/lib/tcl85t.lib)
59  SET(TCL_FOUND TRUE)
60  # Do some hacking to avoid "Tclsh not found" message
61  SET(TCL_TCLSH              ${MSVC_LIBRARY_DIR}/tcl-8.5.2/lib/tcl85t.lib)
62  SET(TCL_TCLSH_FOUND TRUE)
63  SET(ZLIB_INCLUDE_DIR       ${MSVC_LIBRARY_DIR}/zlib-1.2.3/include)
64  SET(ZLIB_LIBRARY optimized ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib.lib
65                   debug     ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib_d.lib)
66  SET(ZLIB_FOUND TRUE)
67
68
69  # Set standard compiler flags
70  SET(CMAKE_C_FLAGS   "$ENV{CFLAGS}   ${ORXONOX_WARNING_FLAGS} -fPIC")
71  SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${ORXONOX_WARNING_FLAGS} -fPIC")
72  # These flags are added to the flags above
73  SET(CMAKE_C_FLAGS_DEBUG            "    -g -ggdb")
74  SET(CMAKE_CXX_FLAGS_DEBUG          "    -g -ggdb")
75  SET(CMAKE_C_FLAGS_RELEASE          "-O3          -DNDEBUG")
76  SET(CMAKE_CXX_FLAGS_RELEASE        "-O3          -DNDEBUG")
77  SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -ggdb -DNDEBUG")
78  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -ggdb -DNDEBUG")
79  SET(CMAKE_C_FLAGS_MINSIZEREL       "-Os          -DNDEBUG")
80  SET(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os          -DNDEBUG")
81
82  # Linker flags
83  SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
84  SET(CMAKE_EXE_LINKER_FLAGS    " --no-undefined")
85  SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
86  SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
87
88  ######################### Misc ##########################
89
90  # Set tolua working directory because lua.dll is not where tolua is
91  SET(TOLUA_PARSER_WORKING_DIRECTORY ${MSVC_LIBRARY_DIR}/bin)
92ENDIF (MSVC)
Note: See TracBrowser for help on using the repository browser.