| [5695] | 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 |  # | 
|---|
| [3167] | 26 |  | 
|---|
| [5695] | 27 | IF(NOT _INTERNAL_PACKAGE_MESSAGE) | 
|---|
 | 28 |   MESSAGE(STATUS "Using library package for the dependencies.") | 
|---|
 | 29 |   SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE) | 
|---|
 | 30 | ENDIF() | 
|---|
| [3167] | 31 |  | 
|---|
| [7244] | 32 | # Ogre versions >= 1.7 require the POCO library on Windows with MSVC for threading | 
|---|
| [7224] | 33 | COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE) | 
|---|
| [8351] | 34 | IF(NOT _result EQUAL -1 AND NOT APPLE) | 
|---|
| [9687] | 35 |   # In dependency package 7 poco is not used anymore - instead we use boost | 
|---|
 | 36 |   COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 7 _result TRUE) | 
|---|
 | 37 |   IF(NOT _result EQUAL -1) | 
|---|
 | 38 |     SET(OGRE_NEEDS_BOOST TRUE) | 
|---|
 | 39 |   ELSE() | 
|---|
 | 40 |     SET(OGRE_NEEDS_POCO TRUE) | 
|---|
 | 41 |   ENDIF() | 
|---|
| [7224] | 42 | ENDIF() | 
|---|
 | 43 |  | 
|---|
| [3167] | 44 | # Include paths and other special treatments | 
|---|
| [5781] | 45 | SET(ENV{ALUTDIR}               ${DEP_INCLUDE_DIR}/freealut) | 
|---|
| [3370] | 46 | SET(ENV{BOOST_ROOT}            ${DEP_INCLUDE_DIR}/boost) | 
|---|
| [5781] | 47 | SET(ENV{CEGUIDIR}              ${DEP_INCLUDE_DIR}/cegui) | 
|---|
| [7449] | 48 | SET(ENV{DBGHELP_DIR}           ${DEP_INCLUDE_DIR}/dbghelp) | 
|---|
| [5781] | 49 | SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx) | 
|---|
| [7459] | 50 | #SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet) | 
|---|
| [8351] | 51 | SET(ENV{LUA5.1_DIR}            ${DEP_INCLUDE_DIR}/lua) | 
|---|
| [5781] | 52 | SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg) | 
|---|
 | 53 | SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis) | 
|---|
| [3370] | 54 | SET(ENV{OGRE_HOME}             ${DEP_INCLUDE_DIR}/ogre) | 
|---|
| [5781] | 55 | SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR}) | 
|---|
 | 56 | SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal) | 
|---|
| [7224] | 57 | SET(ENV{POCODIR}               ${DEP_INCLUDE_DIR}/poco) | 
|---|
| [5781] | 58 | LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl/include) | 
|---|
 | 59 | LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib/include) | 
|---|
| [3167] | 60 |  | 
|---|
 | 61 | ### INSTALL ### | 
|---|
| [3370] | 62 |  | 
|---|
| [5781] | 63 | # Tcl script library | 
|---|
 | 64 | INSTALL( | 
|---|
 | 65 |   DIRECTORY ${DEP_LIBRARY_DIR}/tcl/ | 
|---|
 | 66 |   DESTINATION lib/tcl | 
|---|
 | 67 | ) | 
|---|
 | 68 |  | 
|---|
| [3167] | 69 | # On Windows, DLLs have to be in the executable folder, install them | 
|---|
 | 70 | IF(WIN32 AND DEP_BINARY_DIR) | 
|---|
 | 71 |   ## DEBUG | 
|---|
 | 72 |   # When installing a debug version, we really can't know which libraries | 
|---|
 | 73 |   # are used in released mode because there might be deps of deps. | 
|---|
 | 74 |   # --> Copy all of them, except the debug databases | 
|---|
 | 75 |   INSTALL( | 
|---|
 | 76 |     DIRECTORY ${DEP_BINARY_DIR}/ | 
|---|
 | 77 |     DESTINATION bin | 
|---|
 | 78 |     CONFIGURATIONS Debug | 
|---|
 | 79 |     REGEX "^.*\\.pdb$" EXCLUDE | 
|---|
 | 80 |   ) | 
|---|
 | 81 |  | 
|---|
 | 82 |   ## RELEASE | 
|---|
| [8351] | 83 |   IF(EXISTS ${DEP_BINARY_DIR}/install_manifest.txt) | 
|---|
 | 84 |     FILE(STRINGS ${DEP_BINARY_DIR}/install_manifest.txt _files) | 
|---|
 | 85 |     FOREACH(_file ${_files}) | 
|---|
 | 86 |       INSTALL( | 
|---|
 | 87 |         FILES ${DEP_BINARY_DIR}/${_file} | 
|---|
 | 88 |         DESTINATION bin | 
|---|
| [8368] | 89 |         CONFIGURATIONS RelForDevs Release RelWithDebInfo MinSizeRel | 
|---|
| [8351] | 90 |       ) | 
|---|
| [8405] | 91 |       IF(INSTALL_PDB_FILES) # MSVC specific: install debug symbols files | 
|---|
 | 92 |         GET_FILENAME_COMPONENT(_base_name ${_file} NAME_WE) | 
|---|
 | 93 |         IF(EXISTS ${DEP_BINARY_DIR}/${_base_name}.pdb) | 
|---|
 | 94 |           INSTALL( | 
|---|
 | 95 |             FILES ${DEP_BINARY_DIR}/${_base_name}.pdb | 
|---|
 | 96 |             DESTINATION bin | 
|---|
 | 97 |             CONFIGURATIONS RelForDevs RelWithDebInfo | 
|---|
 | 98 |           ) | 
|---|
 | 99 |         ENDIF() | 
|---|
 | 100 |       ENDIF() | 
|---|
| [8351] | 101 |     ENDFOREACH(_file) | 
|---|
 | 102 |   ELSE() | 
|---|
 | 103 |     # Try to filter out all the debug libraries. If the regex doesn't do the | 
|---|
 | 104 |     # job anymore, simply adjust it. | 
|---|
 | 105 |     INSTALL( | 
|---|
 | 106 |       DIRECTORY ${DEP_BINARY_DIR}/ | 
|---|
 | 107 |       DESTINATION bin | 
|---|
| [8368] | 108 |       CONFIGURATIONS RelForDevs Release RelWithDebInfo MinSizeRel | 
|---|
| [8351] | 109 |       REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE | 
|---|
 | 110 |     ) | 
|---|
 | 111 |   ENDIF() | 
|---|
| [3167] | 112 | ENDIF() | 
|---|