| 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 |  #    General package configuration. Merely sets the include paths. | 
|---|
| 24 |  #    Library files are treated separately. | 
|---|
| 25 |  # | 
|---|
| 26 |  | 
|---|
| 27 | INCLUDE(CheckPackageVersion) | 
|---|
| 28 |  | 
|---|
| 29 | CHECK_PACKAGE_VERSION(3.1 4.0 5.0) | 
|---|
| 30 |  | 
|---|
| 31 | IF(NOT _INTERNAL_PACKAGE_MESSAGE) | 
|---|
| 32 |   MESSAGE(STATUS "Using library package for the dependencies.") | 
|---|
| 33 |   SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE) | 
|---|
| 34 | ENDIF() | 
|---|
| 35 |  | 
|---|
| 36 | # Ogre versions >= 1.7 require the POCO library on Windows with MSVC for threading | 
|---|
| 37 | COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE) | 
|---|
| 38 | IF(NOT _result EQUAL -1 AND NOT MINGW) | 
|---|
| 39 |     SET(POCO_REQUIRED TRUE) | 
|---|
| 40 | ENDIF() | 
|---|
| 41 |  | 
|---|
| 42 | # Include paths and other special treatments | 
|---|
| 43 | SET(ENV{ALUTDIR}               ${DEP_INCLUDE_DIR}/freealut) | 
|---|
| 44 | SET(ENV{BOOST_ROOT}            ${DEP_INCLUDE_DIR}/boost) | 
|---|
| 45 | SET(ENV{CEGUIDIR}              ${DEP_INCLUDE_DIR}/cegui) | 
|---|
| 46 | SET(ENV{DBGHELP_DIR}           ${DEP_INCLUDE_DIR}/dbghelp) | 
|---|
| 47 | SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx) | 
|---|
| 48 | #SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet) | 
|---|
| 49 | SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua) | 
|---|
| 50 | SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg) | 
|---|
| 51 | SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis) | 
|---|
| 52 | SET(ENV{OGRE_HOME}             ${DEP_INCLUDE_DIR}/ogre) | 
|---|
| 53 | SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR}) | 
|---|
| 54 | SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal) | 
|---|
| 55 | SET(ENV{POCODIR}               ${DEP_INCLUDE_DIR}/poco) | 
|---|
| 56 | LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl/include) | 
|---|
| 57 | LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib/include) | 
|---|
| 58 |  | 
|---|
| 59 | ### INSTALL ### | 
|---|
| 60 |  | 
|---|
| 61 | # Tcl script library | 
|---|
| 62 | INSTALL( | 
|---|
| 63 |   DIRECTORY ${DEP_LIBRARY_DIR}/tcl/ | 
|---|
| 64 |   DESTINATION lib/tcl | 
|---|
| 65 | ) | 
|---|
| 66 |  | 
|---|
| 67 | # On Windows, DLLs have to be in the executable folder, install them | 
|---|
| 68 | IF(WIN32 AND DEP_BINARY_DIR) | 
|---|
| 69 |   ## DEBUG | 
|---|
| 70 |   # When installing a debug version, we really can't know which libraries | 
|---|
| 71 |   # are used in released mode because there might be deps of deps. | 
|---|
| 72 |   # --> Copy all of them, except the debug databases | 
|---|
| 73 |   INSTALL( | 
|---|
| 74 |     DIRECTORY ${DEP_BINARY_DIR}/ | 
|---|
| 75 |     DESTINATION bin | 
|---|
| 76 |     CONFIGURATIONS Debug | 
|---|
| 77 |     REGEX "^.*\\.pdb$" EXCLUDE | 
|---|
| 78 |   ) | 
|---|
| 79 |  | 
|---|
| 80 |   ## RELEASE | 
|---|
| 81 |   # Try to filter out all the debug libraries. If the regex doesn't do the | 
|---|
| 82 |   # job anymore, simply adjust it. | 
|---|
| 83 |   INSTALL( | 
|---|
| 84 |     DIRECTORY ${DEP_BINARY_DIR}/ | 
|---|
| 85 |     DESTINATION bin | 
|---|
| 86 |     CONFIGURATIONS Release RelWithDebInfo MinSizeRel | 
|---|
| 87 |     REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE | 
|---|
| 88 |   ) | 
|---|
| 89 | ENDIF() | 
|---|