Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/resource2/cmake/InstallConfig.cmake @ 5664

Last change on this file since 5664 was 5664, checked in by rgrieder, 15 years ago
  • Moved all (as far as possible) build related CMake options and switches to src/OrxonoxConfig.cmake (new file). This should my constant problems of finding options I've created some time ago…
  • Renamed BuildConfig to CompilerConfig (since that's what it has become now).
  • Moved all installation related options and paths to cmake/InstallConfig.cmake (new file)
  • Note: I moved the very basic options to the root CMLs like default paths (bin, lib, doc, etc.), output directories and configuration type.

Actual code changes are absolutely minimal, maybe a few lines or so.

  • Property svn:eol-style set to native
File size: 3.0 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 #    Configures the installation (paths, rpaths, options)
24 #
25
26SET(_info_text "Puts all installed files in subfolders of the install prefix path. That root folder can then be moved, copied and renamed as you wish. The executable will not write to folders like ~/.orxonox or \"Applictation Data\"")
27IF(UNIX)
28  OPTION(INSTALL_COPYABLE "${_info_text}" FALSE)
29ELSE()
30  OPTION(INSTALL_COPYABLE "${_info_text}" TRUE)
31ENDIF()
32
33# Default installation paths
34SET(RUNTIME_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_RUNTIME_PATH})
35SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH})
36SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH})
37SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH})
38SET(DATA_INSTALL_DIRECTORY    ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DATA_PATH})
39SET(CONFIG_INSTALL_DIRECTORY  ${CMAKE_INSTALL_PREFIX}/${DEFAULT_CONFIG_PATH})
40SET(LOG_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LOG_PATH})
41
42IF(NOT INSTALL_COPYABLE)
43  IF(UNIX) # Apple too?
44    # Using absolute paths
45    SET(RUNTIME_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)
46    SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox)
47    SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox/static)
48    SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox)
49    SET(DATA_INSTALL_DIRECTORY    ${CMAKE_INSTALL_PREFIX}/share/orxonox)
50  ENDIF()
51
52  # Leave empty because it is user and therefore runtime dependent
53  SET(CONFIG_INSTALL_DIRECTORY)
54  SET(LOG_INSTALL_DIRECTORY)
55ENDIF()
56
57################## Unix rpath ###################
58
59# When building, don't use the install RPATH already
60# (but later on when installing)
61SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 
62
63# The RPATH to be used when installing
64IF(INSTALL_COPYABLE)
65  SET(CMAKE_INSTALL_RPATH ${DEFAULT_LIBRARY_PATH})
66ELSE()
67  SET(CMAKE_INSTALL_RPATH ${LIBRARY_INSTALL_DIRECTORY})
68ENDIF()
69
70# Add the automatically determined parts of the RPATH
71# which point to directories outside the build tree to the install RPATH
72SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
Note: See TracBrowser for help on using the repository browser.