~ubuntu-branches/ubuntu/precise/cmake/precise

« back to all changes in this revision

Viewing changes to .pc/ubuntu_multiarch_library_directory.diff/Modules/Platform/UnixPaths.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2011-03-18 17:30:30 UTC
  • Revision ID: james.westby@ubuntu.com-20110318173030-oabft1b5vjqb38eb
Tags: 2.8.3-3ubuntu3
Add ubuntu_multiarch_library_directory.diff to find location of
multiarch directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#=============================================================================
 
3
# Copyright 2006-2009 Kitware, Inc.
 
4
#
 
5
# Distributed under the OSI-approved BSD License (the "License");
 
6
# see accompanying file Copyright.txt for details.
 
7
#
 
8
# This software is distributed WITHOUT ANY WARRANTY; without even the
 
9
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
10
# See the License for more information.
 
11
#=============================================================================
 
12
# (To distribute this file outside of CMake, substitute the full
 
13
#  License text for the above reference.)
 
14
 
 
15
# Block multiple inclusion because "CMakeCInformation.cmake" includes
 
16
# "Platform/${CMAKE_SYSTEM_NAME}" even though the generic module
 
17
# "CMakeSystemSpecificInformation.cmake" already included it.
 
18
# The extra inclusion is a work-around documented next to the include()
 
19
# call, so this can be removed when the work-around is removed.
 
20
IF(__UNIX_PATHS_INCLUDED)
 
21
  RETURN()
 
22
ENDIF()
 
23
SET(__UNIX_PATHS_INCLUDED 1)
 
24
 
 
25
SET(UNIX 1)
 
26
 
 
27
# also add the install directory of the running cmake to the search directories
 
28
# CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up
 
29
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
 
30
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
 
31
 
 
32
# List common installation prefixes.  These will be used for all
 
33
# search types.
 
34
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
 
35
  # Standard
 
36
  /usr/local /usr /
 
37
 
 
38
  # CMake install location
 
39
  "${_CMAKE_INSTALL_DIR}"
 
40
 
 
41
  # Project install destination.
 
42
  "${CMAKE_INSTALL_PREFIX}"
 
43
  )
 
44
 
 
45
# List common include file locations not under the common prefixes.
 
46
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
 
47
  # Windows API on Cygwin
 
48
  /usr/include/w32api
 
49
 
 
50
  # X11
 
51
  /usr/X11R6/include /usr/include/X11
 
52
 
 
53
  # Other
 
54
  /usr/pkg/include
 
55
  /opt/csw/include /opt/include  
 
56
  /usr/openwin/include
 
57
  )
 
58
 
 
59
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
 
60
  # Windows API on Cygwin
 
61
  /usr/lib/w32api
 
62
 
 
63
  # X11
 
64
  /usr/X11R6/lib /usr/lib/X11
 
65
 
 
66
  # Other
 
67
  /usr/pkg/lib
 
68
  /opt/csw/lib /opt/lib 
 
69
  /usr/openwin/lib
 
70
  )
 
71
 
 
72
LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
 
73
  /usr/pkg/bin
 
74
  )
 
75
 
 
76
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
 
77
  /lib /usr/lib /usr/lib32 /usr/lib64
 
78
  )
 
79
 
 
80
LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
 
81
  /usr/include
 
82
  )
 
83
LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
 
84
  /usr/include
 
85
  )
 
86
 
 
87
# Enable use of lib64 search path variants by default.
 
88
SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)