Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/mac_osx/cmake/PackageConfig.cmake @ 8725

Last change on this file since 8725 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.2 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 #    General package configuration. Merely sets the include paths.
24 #    Library files are treated separately.
25 #
26
27INCLUDE(CheckPackageVersion)
28
29CHECK_PACKAGE_VERSION(3.1 4.0 5.0)
30
31IF(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)
34ENDIF()
35
36# Ogre versions >= 1.7 require the POCO library on Windows with MSVC for threading
37COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE)
38IF(NOT _result EQUAL -1 AND NOT MINGW)
39    SET(POCO_REQUIRED TRUE)
40ENDIF()
41
42# Include paths and other special treatments
43SET(ENV{ALUTDIR}               ${DEP_INCLUDE_DIR}/freealut)
44SET(ENV{BOOST_ROOT}            ${DEP_INCLUDE_DIR}/boost)
45SET(ENV{CEGUIDIR}              ${DEP_INCLUDE_DIR}/cegui)
46SET(ENV{DBGHELP_DIR}           ${DEP_INCLUDE_DIR}/dbghelp)
47SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx)
48#SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet)
49SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua)
50SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg)
51SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis)
52SET(ENV{OGRE_HOME}             ${DEP_INCLUDE_DIR}/ogre)
53SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
54SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal)
55SET(ENV{POCODIR}               ${DEP_INCLUDE_DIR}/poco)
56LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl/include)
57LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib/include)
58
59### INSTALL ###
60
61# Tcl script library
62INSTALL(
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
68IF(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  )
89ENDIF()
Note: See TracBrowser for help on using the repository browser.