[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: |
---|
[7582] | 23 | # OS X package configuration |
---|
[5695] | 24 | # |
---|
[3167] | 25 | |
---|
[7582] | 26 | INCLUDE(CheckPackageVersion) |
---|
[5923] | 27 | |
---|
[7582] | 28 | CHECK_PACKAGE_VERSION(1.0) |
---|
[3167] | 29 | |
---|
[5695] | 30 | IF(NOT _INTERNAL_PACKAGE_MESSAGE) |
---|
| 31 | MESSAGE(STATUS "Using library package for the dependencies.") |
---|
| 32 | SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE) |
---|
| 33 | ENDIF() |
---|
[3167] | 34 | |
---|
[7582] | 35 | SET(DEP_INCLUDE_DIR ${DEPENDENCY_PACKAGE_DIR}/include) |
---|
| 36 | SET(DEP_LIBRARY_DIR ${DEPENDENCY_PACKAGE_DIR}/lib) |
---|
| 37 | SET(DEP_BINARY_DIR ${DEPENDENCY_PACKAGE_DIR}/bin) |
---|
[7591] | 38 | SET(DEP_FRAMEWORK_DIR ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks) |
---|
[7224] | 39 | |
---|
[7582] | 40 | # Sets the library path for the FIND_LIBRARY |
---|
| 41 | SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR}) |
---|
| 42 | |
---|
[3167] | 43 | # Include paths and other special treatments |
---|
[7615] | 44 | SET(ENV{ALUTDIR} ${DEP_FRAMEWORK_DIR}) |
---|
[7591] | 45 | SET(ENV{BOOST_ROOT} ${DEPENDENCY_PACKAGE_DIR}) |
---|
[8119] | 46 | SET(ENV{CEGUIDIR} ${DEP_FRAMEWORK_DIR}) |
---|
[8113] | 47 | SET(ENV{CEGUILUADIR} ${DEP_FRAMEWORK_DIR}/CEGUILuaScriptModule.framework) |
---|
| 48 | SET(ENV{CEGUITOLUADIR} ${DEP_FRAMEWORK_DIR}/ceguitolua++.framework) |
---|
[8118] | 49 | SET(ENV{LUA5.1_DIR} $ENV{CEGUILUADIR}/Versions/A/Resources/lua.framework) |
---|
[7591] | 50 | SET(ENV{OGGDIR} ${DEP_INCLUDE_DIR}) |
---|
| 51 | SET(ENV{VORBISDIR} ${DEP_INCLUDE_DIR}) |
---|
| 52 | SET(ENV{OGRE_HOME} ${DEP_FRAMEWORK_DIR}) |
---|
[5781] | 53 | SET(ENV{OGRE_PLUGIN_DIR} ${DEP_BINARY_DIR}) |
---|
[3167] | 54 | |
---|
[8073] | 55 | # For OS X 10.5 we have to ship modified headers to make it compile |
---|
| 56 | # on gcc >= 4.2 (binaries stay the same) |
---|
| 57 | # Sets the library path for the FIND_LIBRARY |
---|
| 58 | IF(CMAKE_SYSTEM_VERSION STREQUAL "10.5") |
---|
| 59 | SET(ENV{OPENALDIR} ${DEP_INCLUDE_DIR}/openal) |
---|
| 60 | ENDIF() |
---|
| 61 | |
---|
[7682] | 62 | # Xcode won't be able to run the toluabind code generation if we're using the dependency package |
---|
| 63 | #IF(DEPENDENCY_PACKAGE_ENABLE) |
---|
| 64 | # IF(${CMAKE_GENERATOR} STREQUAL "Xcode") |
---|
| 65 | # SET(ENV{DYLD_LIBRARY_PATH} ${DEPENDENCY_PACKAGE_DIR}/lib) |
---|
| 66 | # SET(ENV{DYLD_FRAMEWORK_PATH} ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks) |
---|
| 67 | # ENDIF(${CMAKE_GENERATOR} STREQUAL "Xcode") |
---|
| 68 | #ENDIF(DEPENDENCY_PACKAGE_ENABLE) |
---|
| 69 | |
---|
[3167] | 70 | ### INSTALL ### |
---|
[3370] | 71 | |
---|
[5781] | 72 | # Tcl script library |
---|
[7582] | 73 | # TODO: How does this work on OS X? |
---|
| 74 | #INSTALL( |
---|
| 75 | # DIRECTORY ${DEP_LIBRARY_DIR}/tcl/ |
---|
| 76 | # DESTINATION lib/tcl |
---|
| 77 | #) |
---|
[5781] | 78 | |
---|
[7582] | 79 | # TODO: Install on OSX |
---|
| 80 | IF(FALSE) |
---|
[3167] | 81 | ## DEBUG |
---|
| 82 | # When installing a debug version, we really can't know which libraries |
---|
| 83 | # are used in released mode because there might be deps of deps. |
---|
| 84 | # --> Copy all of them, except the debug databases |
---|
| 85 | INSTALL( |
---|
| 86 | DIRECTORY ${DEP_BINARY_DIR}/ |
---|
| 87 | DESTINATION bin |
---|
| 88 | CONFIGURATIONS Debug |
---|
| 89 | REGEX "^.*\\.pdb$" EXCLUDE |
---|
| 90 | ) |
---|
| 91 | |
---|
| 92 | ## RELEASE |
---|
| 93 | # Try to filter out all the debug libraries. If the regex doesn't do the |
---|
| 94 | # job anymore, simply adjust it. |
---|
| 95 | INSTALL( |
---|
| 96 | DIRECTORY ${DEP_BINARY_DIR}/ |
---|
| 97 | DESTINATION bin |
---|
| 98 | CONFIGURATIONS Release RelWithDebInfo MinSizeRel |
---|
| 99 | REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE |
---|
| 100 | ) |
---|
| 101 | ENDIF() |
---|