Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ois_update/cmake/PackageConfigOSX.cmake @ 7582

Last change on this file since 7582 was 7582, checked in by rgrieder, 14 years ago

Added CMake code for OS X package configuration.
Not guaranteed to work… Mainly because it requires several adjustments of the paths.

  • Property svn:eol-style set to native
File size: 3.4 KB
Line 
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 #    OS X package configuration
24 #
25
26INCLUDE(CheckPackageVersion)
27
28CHECK_PACKAGE_VERSION(1.0)
29
30IF(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)
33ENDIF()
34
35SET(DEP_INCLUDE_DIR ${DEPENDENCY_PACKAGE_DIR}/include)
36SET(DEP_LIBRARY_DIR ${DEPENDENCY_PACKAGE_DIR}/lib)
37SET(DEP_BINARY_DIR  ${DEPENDENCY_PACKAGE_DIR}/bin)
38
39# Sets the library path for the FIND_LIBRARY
40SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR})
41
42# Certain find scripts don't behave as ecpected so we have
43# to specify the libraries ourselves.
44SET(TCL_LIBRARY  ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "")
45SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "")
46
47# Include paths and other special treatments
48SET(ENV{ALUTDIR}               ${DEP_INCLUDE_DIR}/freealut)
49SET(ENV{BOOST_ROOT}            ${DEP_INCLUDE_DIR}/boost)
50SET(ENV{CEGUIDIR}              ${DEP_INCLUDE_DIR}/cegui)
51SET(ENV{DBGHELP_DIR}           ${DEP_INCLUDE_DIR}/dbghelp)
52SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx)
53#SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet)
54SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua)
55SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg)
56SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis)
57SET(ENV{OGRE_HOME}             ${DEP_INCLUDE_DIR}/ogre)
58SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
59SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal)
60SET(ENV{POCODIR}               ${DEP_INCLUDE_DIR}/poco)
61LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl/include)
62LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib/include)
63
64### INSTALL ###
65
66# Tcl script library
67# TODO: How does this work on OS X?
68#INSTALL(
69#  DIRECTORY ${DEP_LIBRARY_DIR}/tcl/
70#  DESTINATION lib/tcl
71#)
72
73# TODO: Install on OSX
74IF(FALSE)
75  ## DEBUG
76  # When installing a debug version, we really can't know which libraries
77  # are used in released mode because there might be deps of deps.
78  # --> Copy all of them, except the debug databases
79  INSTALL(
80    DIRECTORY ${DEP_BINARY_DIR}/
81    DESTINATION bin
82    CONFIGURATIONS Debug
83    REGEX "^.*\\.pdb$" EXCLUDE
84  )
85
86  ## RELEASE
87  # Try to filter out all the debug libraries. If the regex doesn't do the
88  # job anymore, simply adjust it.
89  INSTALL(
90    DIRECTORY ${DEP_BINARY_DIR}/
91    DESTINATION bin
92    CONFIGURATIONS Release RelWithDebInfo MinSizeRel
93    REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE
94  )
95ENDIF()
Note: See TracBrowser for help on using the repository browser.