Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/kicklib/cmake/PackageConfigOSX.cmake @ 8121

Last change on this file since 8121 was 8121, checked in by rgrieder, 13 years ago

Lua is in the CEGUILuaScriptModule framework, not in the CEGUI framework.

  • 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)
38SET(DEP_FRAMEWORK_DIR ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks)
39
40# Sets the library and framwork paths for the FIND_LIBRARY commands
41SET(CMAKE_LIBRARY_PATH   ${DEP_LIBRARY_DIR})
42SET(CMAKE_FRAMEWORK_PATH ${DEP_FRAMEWORK_DIR})
43
44# Include paths and other special treatments
45SET(ENV{BOOST_ROOT}      ${DEPENDENCY_PACKAGE_DIR})
46SET(ENV{LUA5.1_DIR}      ${DEP_FRAMEWORK_DIR}/CEGUILuaScriptModule.framework/Versions/A/Resources)
47SET(ENV{OGGDIR}          ${DEP_INCLUDE_DIR})
48SET(ENV{VORBISDIR}       ${DEP_INCLUDE_DIR})
49SET(ENV{OGRE_PLUGIN_DIR} ${DEP_BINARY_DIR})
50
51# For OS X 10.5 we have to ship modified headers to make it compile
52# on gcc >= 4.2 (binaries stay the same)
53# Sets the library path for the FIND_LIBRARY
54IF(CMAKE_SYSTEM_VERSION STREQUAL "10.5")
55  SET(ENV{OPENALDIR} ${DEP_INCLUDE_DIR}/openal)
56ENDIF()
57
58# Xcode won't be able to run the toluabind code generation if we're using the dependency package
59#IF(DEPENDENCY_PACKAGE_ENABLE)
60#  IF(${CMAKE_GENERATOR} STREQUAL "Xcode")
61#    SET(ENV{DYLD_LIBRARY_PATH}               ${DEPENDENCY_PACKAGE_DIR}/lib)
62#    SET(ENV{DYLD_FRAMEWORK_PATH}             ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks)
63#  ENDIF(${CMAKE_GENERATOR} STREQUAL "Xcode")
64#ENDIF(DEPENDENCY_PACKAGE_ENABLE)
65
66### INSTALL ###
67
68# Tcl script library
69# TODO: How does this work on OS X?
70#INSTALL(
71#  DIRECTORY ${DEP_LIBRARY_DIR}/tcl/
72#  DESTINATION lib/tcl
73#)
74
75# TODO: Install on OSX
76IF(FALSE)
77  ## DEBUG
78  # When installing a debug version, we really can't know which libraries
79  # are used in released mode because there might be deps of deps.
80  # --> Copy all of them, except the debug databases
81  INSTALL(
82    DIRECTORY ${DEP_BINARY_DIR}/
83    DESTINATION bin
84    CONFIGURATIONS Debug
85    REGEX "^.*\\.pdb$" EXCLUDE
86  )
87
88  ## RELEASE
89  # Try to filter out all the debug libraries. If the regex doesn't do the
90  # job anymore, simply adjust it.
91  INSTALL(
92    DIRECTORY ${DEP_BINARY_DIR}/
93    DESTINATION bin
94    CONFIGURATIONS Release RelWithDebInfo MinSizeRel
95    REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE
96  )
97ENDIF()
Note: See TracBrowser for help on using the repository browser.