[2218] | 1 | # |
---|
[2626] | 2 | # ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | # > www.orxonox.net < |
---|
[2218] | 4 | # |
---|
[2626] | 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. |
---|
[2218] | 9 | # |
---|
[2626] | 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. |
---|
[2218] | 14 | # |
---|
[2626] | 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. |
---|
[2218] | 18 | # |
---|
| 19 | # |
---|
[2626] | 20 | # Author: |
---|
| 21 | # Reto Grieder |
---|
| 22 | # Description: |
---|
| 23 | # Sets the library directories when using precompiled dependency archives |
---|
| 24 | # on Windows with MinGW. |
---|
[2218] | 25 | # |
---|
| 26 | |
---|
[2197] | 27 | |
---|
[2624] | 28 | IF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED) |
---|
[2629] | 29 | |
---|
[2582] | 30 | MESSAGE(STATUS "Running on MinGW. Using customized paths and options.") |
---|
| 31 | |
---|
| 32 | # Determine library directory |
---|
[2629] | 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") |
---|
[2624] | 37 | ELSE() |
---|
[2582] | 38 | MESSAGE(FATAL_ERROR "Could not find dependency directory for the MinGW libraries") |
---|
[2624] | 39 | ENDIF() |
---|
[2579] | 40 | |
---|
[2629] | 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 | |
---|
[2583] | 53 | # Note: When setting ENV${} variables, make sure to use quotes when |
---|
| 54 | # having multiple directories. |
---|
[2629] | 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) |
---|
[2624] | 58 | IF($ENV{DXSDK_DIR} STREQUAL "") |
---|
[2629] | 59 | SET(ENV{DXSDK_DIR} ${MINGW_INCLUDE_DIR}/directx-2007.aug) |
---|
[2624] | 60 | ENDIF() |
---|
[2629] | 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 | |
---|
[2624] | 73 | ENDIF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED) |
---|