Mercurial > vanilla
comparison dev/cmake/patch-fhs.patch @ 1253:a4af66d977fd
dev/cmake: upgrade to 3.21.4
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 01 Nov 2021 13:53:00 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1252:b811a6479213 | 1253:a4af66d977fd |
---|---|
1 --- a/Modules/Platform/UnixPaths.cmake | |
2 +++ b/Modules/Platform/UnixPaths.cmake | |
3 @@ -27,7 +27,7 @@ | |
4 # synchronized | |
5 list(APPEND CMAKE_SYSTEM_PREFIX_PATH | |
6 # Standard | |
7 - /usr/local /usr / | |
8 + /local / | |
9 | |
10 # CMake install location | |
11 "${_CMAKE_INSTALL_DIR}" | |
12 @@ -45,26 +45,14 @@ | |
13 endif() | |
14 endif() | |
15 | |
16 -# Non "standard" but common install prefixes | |
17 -list(APPEND CMAKE_SYSTEM_PREFIX_PATH | |
18 - /usr/X11R6 | |
19 - /usr/pkg | |
20 - /opt | |
21 - ) | |
22 - | |
23 # List common include file locations not under the common prefixes. | |
24 list(APPEND CMAKE_SYSTEM_INCLUDE_PATH | |
25 # X11 | |
26 - /usr/include/X11 | |
27 + /include/X11 | |
28 ) | |
29 | |
30 -list(APPEND CMAKE_SYSTEM_LIBRARY_PATH | |
31 - # X11 | |
32 - /usr/lib/X11 | |
33 - ) | |
34 - | |
35 list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES | |
36 - /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 | |
37 + /lib | |
38 ) | |
39 | |
40 if(CMAKE_SYSROOT_COMPILE) | |
41 @@ -77,15 +65,15 @@ | |
42 # parsing the implicit directory information from compiler output. | |
43 set(_CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES_INIT | |
44 ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} | |
45 - "${_cmake_sysroot_compile}/usr/include" | |
46 + "${_cmake_sysroot_compile}/include" | |
47 ) | |
48 set(_CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES_INIT | |
49 ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} | |
50 - "${_cmake_sysroot_compile}/usr/include" | |
51 + "${_cmake_sysroot_compile}/include" | |
52 ) | |
53 set(_CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES_INIT | |
54 ${CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES} | |
55 - "${_cmake_sysroot_compile}/usr/include" | |
56 + "${_cmake_sysroot_compile}/include" | |
57 ) | |
58 | |
59 unset(_cmake_sysroot_compile) | |
60 --- a/Modules/GNUInstallDirs.cmake | |
61 +++ b/Modules/GNUInstallDirs.cmake | |
62 @@ -57,7 +57,7 @@ | |
63 ``INCLUDEDIR`` | |
64 C header files (``include``) | |
65 ``OLDINCLUDEDIR`` | |
66 - C header files for non-gcc (``/usr/include``) | |
67 + C header files for non-gcc (``/include``) | |
68 ``DATAROOTDIR`` | |
69 read-only architecture-independent data root (``share``) | |
70 ``DATADIR`` | |
71 @@ -188,94 +188,8 @@ | |
72 "Modifiable architecture-independent data (com)") | |
73 _GNUInstallDirs_cache_path(CMAKE_INSTALL_LOCALSTATEDIR "var" | |
74 "Modifiable single-machine data (var)") | |
75 - | |
76 -# We check if the variable was manually set and not cached, in order to | |
77 -# allow projects to set the values as normal variables before including | |
78 -# GNUInstallDirs to avoid having the entries cached or user-editable. It | |
79 -# replaces the "if(NOT DEFINED CMAKE_INSTALL_XXX)" checks in all the | |
80 -# other cases. | |
81 -# If CMAKE_INSTALL_LIBDIR is defined, if _libdir_set is false, then the | |
82 -# variable is a normal one, otherwise it is a cache one. | |
83 -get_property(_libdir_set CACHE CMAKE_INSTALL_LIBDIR PROPERTY TYPE SET) | |
84 -if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set | |
85 - AND DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX | |
86 - AND NOT "${_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_INSTALL_PREFIX}")) | |
87 - # If CMAKE_INSTALL_LIBDIR is not defined, it is always executed. | |
88 - # Otherwise: | |
89 - # * if _libdir_set is false it is not executed (meaning that it is | |
90 - # not a cache variable) | |
91 - # * if _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX is not defined it is | |
92 - # not executed | |
93 - # * if _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX and | |
94 - # CMAKE_INSTALL_PREFIX are the same string it is not executed. | |
95 - # _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX is updated after the | |
96 - # execution, of this part of code, therefore at the next inclusion | |
97 - # of the file, CMAKE_INSTALL_LIBDIR is defined, and the 2 strings | |
98 - # are equal, meaning that the if is not executed the code the | |
99 - # second time. | |
100 - | |
101 - set(_LIBDIR_DEFAULT "lib") | |
102 - # Override this default 'lib' with 'lib64' iff: | |
103 - # - we are on Linux system but NOT cross-compiling | |
104 - # - we are NOT on debian | |
105 - # - we are on a 64 bits system | |
106 - # reason is: amd64 ABI: https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI | |
107 - # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if | |
108 - # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu" | |
109 - # and CMAKE_INSTALL_PREFIX is "/usr" | |
110 - # See http://wiki.debian.org/Multiarch | |
111 - if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX) | |
112 - set(__LAST_LIBDIR_DEFAULT "lib") | |
113 - # __LAST_LIBDIR_DEFAULT is the default value that we compute from | |
114 - # _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX, not a cache entry for | |
115 - # the value that was last used as the default. | |
116 - # This value is used to figure out whether the user changed the | |
117 - # CMAKE_INSTALL_LIBDIR value manually, or if the value was the | |
118 - # default one. When CMAKE_INSTALL_PREFIX changes, the value is | |
119 - # updated to the new default, unless the user explicitly changed it. | |
120 - endif() | |
121 - if (NOT DEFINED CMAKE_SYSTEM_NAME OR NOT DEFINED CMAKE_SIZEOF_VOID_P) | |
122 - message(AUTHOR_WARNING | |
123 - "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. " | |
124 - "Please enable at least one language before including GNUInstallDirs.") | |
125 - endif() | |
126 - if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" | |
127 - AND NOT CMAKE_CROSSCOMPILING | |
128 - AND NOT EXISTS "/etc/alpine-release" | |
129 - AND NOT EXISTS "/etc/arch-release") | |
130 - if (EXISTS "/etc/debian_version") # is this a debian system ? | |
131 - if(CMAKE_LIBRARY_ARCHITECTURE) | |
132 - if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$") | |
133 - set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}") | |
134 - endif() | |
135 - if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX | |
136 - AND "${_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$") | |
137 - set(__LAST_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}") | |
138 - endif() | |
139 - endif() | |
140 - else() # not debian, rely on CMAKE_SIZEOF_VOID_P: | |
141 - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") | |
142 - set(_LIBDIR_DEFAULT "lib64") | |
143 - if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX) | |
144 - set(__LAST_LIBDIR_DEFAULT "lib64") | |
145 - endif() | |
146 - endif() | |
147 - endif() | |
148 - endif() | |
149 - if(NOT DEFINED CMAKE_INSTALL_LIBDIR) | |
150 - set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "Object code libraries (${_LIBDIR_DEFAULT})") | |
151 - elseif(DEFINED __LAST_LIBDIR_DEFAULT | |
152 - AND "${__LAST_LIBDIR_DEFAULT}" STREQUAL "${CMAKE_INSTALL_LIBDIR}") | |
153 - set_property(CACHE CMAKE_INSTALL_LIBDIR PROPERTY VALUE "${_LIBDIR_DEFAULT}") | |
154 - endif() | |
155 -endif() | |
156 -_GNUInstallDirs_cache_convert_to_path(CMAKE_INSTALL_LIBDIR "Object code libraries (lib)") | |
157 - | |
158 -# Save for next run | |
159 -set(_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "CMAKE_INSTALL_PREFIX during last run") | |
160 -unset(_libdir_set) | |
161 -unset(__LAST_LIBDIR_DEFAULT) | |
162 - | |
163 +_GNUInstallDirs_cache_path(CMAKE_INSTALL_LIBDIR "lib" | |
164 + "Object code libraries (lib)") | |
165 _GNUInstallDirs_cache_path(CMAKE_INSTALL_INCLUDEDIR "include" | |
166 "C header files (include)") | |
167 _GNUInstallDirs_cache_path(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" |