1 | # |
---|
2 | # ORXONOX - the hottest 3D action shooter ever to exist |
---|
3 | # > www.orxonox.net < |
---|
4 | # |
---|
5 | # This program is free software; you can redistribute it and/or |
---|
6 | # modify it under the terms of the GNU General Public License |
---|
7 | # as published by the Free Software Foundation; either version 2 |
---|
8 | # of the License, or (at your option) any later version. |
---|
9 | # |
---|
10 | # This program is distributed in the hope that it will be useful, |
---|
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | # GNU General Public License for more details. |
---|
14 | # |
---|
15 | # You should have received a copy of the GNU General Public License along |
---|
16 | # with this program; if not, write to the Free Software Foundation, |
---|
17 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
18 | # |
---|
19 | # |
---|
20 | # Author: |
---|
21 | # Reto Grieder |
---|
22 | # Description: |
---|
23 | # Sets the library directories when using precompiled dependency archives |
---|
24 | # on Windows with MinGW. |
---|
25 | # |
---|
26 | |
---|
27 | |
---|
28 | IF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED) |
---|
29 | |
---|
30 | MESSAGE(STATUS "Running on MinGW. Using customized paths and options.") |
---|
31 | |
---|
32 | # Determine library directory |
---|
33 | IF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/include) |
---|
34 | SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/dependencies") |
---|
35 | ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../dependencies/include) |
---|
36 | SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/../dependencies/include") |
---|
37 | ELSE() |
---|
38 | MESSAGE(FATAL_ERROR "Could not find dependency directory for the MinGW libraries") |
---|
39 | ENDIF() |
---|
40 | |
---|
41 | # 64 bit system? |
---|
42 | IF(CMAKE_SIZEOF_VOID_P EQUAL 8) |
---|
43 | SET(MINGW_MACHINE_POSTFIX x64) |
---|
44 | ELSE() |
---|
45 | SET(MINGW_MACHINE_POSTFIX x86) |
---|
46 | ENDIF() |
---|
47 | SET(MINGW_INCLUDE_DIR ${DEPENDENCY_DIR}/include) |
---|
48 | SET(MINGW_LIBRARY_DIR ${DEPENDENCY_DIR}/lib/mingw-${MINGW_MACHINE_POSTFIX}) |
---|
49 | SET(MINGW_BINARY_DIR ${DEPENDENCY_DIR}/bin/mingw-${MINGW_MACHINE_POSTFIX}) |
---|
50 | SET(CMAKE_LIBRARY_PATH ${MINGW_LIBRARY_DIR} ${MINGW_BINARY_DIR}) |
---|
51 | SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MINGW_BINARY_DIR}) |
---|
52 | |
---|
53 | # Note: When setting ENV${} variables, make sure to use quotes when |
---|
54 | # having multiple directories. |
---|
55 | SET(ENV{ALUTDIR} ${MINGW_INCLUDE_DIR}/freealut-1.1.0) |
---|
56 | SET(ENV{BOOST_ROOT} ${MINGW_INCLUDE_DIR}/boost-1.34.1) |
---|
57 | SET(ENV{CEGUIDIR} ${MINGW_INCLUDE_DIR}/cegui-0.6.1) |
---|
58 | IF($ENV{DXSDK_DIR} STREQUAL "") |
---|
59 | SET(ENV{DXSDK_DIR} ${MINGW_INCLUDE_DIR}/directx-2007.aug) |
---|
60 | ENDIF() |
---|
61 | SET(ENV{ENETDIR} ${MINGW_INCLUDE_DIR}/enet-1.1) |
---|
62 | SET(LINK_ENET_DYNAMIC FALSE) |
---|
63 | SET(ENV{LUA_DIR} ${MINGW_INCLUDE_DIR}/lua-5.1.3) |
---|
64 | SET(ENV{OGGDIR} ${MINGW_INCLUDE_DIR}/libogg-1.1.3) |
---|
65 | SET(ENV{OGRE_HOME} ${MINGW_INCLUDE_DIR}/ogre-1.4.8) |
---|
66 | SET(ENV{OGRE_PLUGIN_DIR} ${MINGW_BINARY_DIR}) |
---|
67 | SET(ENV{OPENALDIR} ${MINGW_INCLUDE_DIR}/openal-0.0.8) |
---|
68 | LIST(APPEND CMAKE_INCLUDE_PATH ${MINGW_INCLUDE_DIR}/tcl-8.5.2/include) |
---|
69 | SET(ENV{VORBISDIR} ${MINGW_INCLUDE_DIR}/libvorbis-1.2.0) |
---|
70 | LIST(APPEND CMAKE_INCLUDE_PATH ${MINGW_INCLUDE_DIR}/zlib-1.2.3/include) |
---|
71 | SET(LINK_ZLIB_DYNAMIC FALSE) |
---|
72 | |
---|
73 | ENDIF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED) |
---|