1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
From aa8c0176389436e698e2f7e84097b4151b6477bf Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Fri, 1 Mar 2019 23:11:41 +0100
Subject: [PATCH 2/6] Set some proper paths to make cmake find our tools.
The ebuild now adds an extra / at the end of $EPREFIX so that it is
never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains
correct)
Original patch by Heiko Przybyl.
Updated by Chris Reffett (cmake-2.8.8)
Updated by Johannes Huber (cmake-2.8.9)
Updated by Michael Palimaka (cmake-2.8.10)
Updated by Chris Reffett (cmake-2.8.11)
Updated by Michael Palimaka (cmake-3.0.0)
Updated by Lars Wendler (cmake-3.9.0_rc2)
Updated by Benda Xu (cmake-3.13.4)
Updated by Lars Wendler (cmake-3.14.0_rc1)
Updated by Lars Wendler (cmake-3.14.0_rc2)
Updated by Lars Wendler (cmake-3.14.0_rc3)
Updated by Jacob Floyd (cmake-3.19.2)
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -138,9 +138,9 @@ set(CMAKE_LINK_LIBRARY_USING_WEAK_LIBRARY_SUPPORTED TRUE)
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "LINKER:-force_load <LIB_ITEM>")
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
-# default to searching for frameworks first
+# default to searching for frameworks last
if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
- set(CMAKE_FIND_FRAMEWORK FIRST)
+ set(CMAKE_FIND_FRAMEWORK LAST)
endif()
# Older OS X linkers do not report their framework search path
@@ -162,6 +162,9 @@ endif()
# set up the default search directories for frameworks
set(CMAKE_SYSTEM_FRAMEWORK_PATH
+ @GENTOO_PORTAGE_EPREFIX@MacOSX.sdk/System/Library/Frameworks
+ @GENTOO_PORTAGE_EPREFIX@Frameworks
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
~/Library/Frameworks
)
if(_CMAKE_OSX_SYSROOT_PATH)
@@ -219,13 +222,15 @@ if(CMAKE_OSX_SYSROOT)
endif()
endif()
-# default to searching for application bundles first
+# default to searching for application bundles last
if(NOT DEFINED CMAKE_FIND_APPBUNDLE)
- set(CMAKE_FIND_APPBUNDLE FIRST)
+ set(CMAKE_FIND_APPBUNDLE LAST)
endif()
# set up the default search directories for application bundles
set(_apps_paths)
foreach(_path
+ @GENTOO_PORTAGE_EPREFIX@Applications
+ @GENTOO_PORTAGE_EPREFIX@usr/bin
"~/Applications"
"/Applications"
"${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -30,7 +30,8 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
# synchronized
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Standard
- /usr/local /usr /
+ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@
+ @GENTOO_HOST@/usr/local /usr /
# CMake install location
"${_CMAKE_INSTALL_DIR}"
@@ -58,17 +59,33 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# List common include file locations not under the common prefixes.
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
- # X11
- /usr/include/X11
+ @GENTOO_PORTAGE_EPREFIX@usr/include
)
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
- # X11
- /usr/lib/X11
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
+ @GENTOO_PORTAGE_GCCLIBDIR@
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
+ @GENTOO_PORTAGE_EPREFIX@lib
+ )
+
+list(APPEND CMAKE_SYSTEM_PROGRAM_PATH
+ @GENTOO_PORTAGE_EPREFIX@usr/bin
+ @GENTOO_PORTAGE_EPREFIX@bin
)
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
+ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
+ @GENTOO_PORTAGE_GCCLIBDIR@
+ @GENTOO_PORTAGE_EPREFIX@usr/lib64
+ @GENTOO_PORTAGE_EPREFIX@usr/libx32
+ @GENTOO_PORTAGE_EPREFIX@usr/lib32
+ @GENTOO_PORTAGE_EPREFIX@usr/lib
+ @GENTOO_PORTAGE_EPREFIX@lib
+ @GENTOO_HOST@/lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32
)
if(CMAKE_SYSROOT_COMPILE)
@@ -81,11 +98,13 @@ endif()
# parsing the implicit directory information from compiler output.
set(_CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES_INIT
${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}
- "${_cmake_sysroot_compile}/usr/include"
+ @GENTOO_PORTAGE_EPREFIX@usr/include
+ @GENTOO_HOST@/usr/include
)
set(_CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES_INIT
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}
- "${_cmake_sysroot_compile}/usr/include"
+ @GENTOO_PORTAGE_EPREFIX@usr/include
+ @GENTOO_HOST@/usr/include
)
set(_CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES_INIT
${CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES}
--
2.41.0
|