Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-01-17 10:07:12 +0300
committerCampbell Barton <campbell@blender.org>2022-01-17 10:12:15 +0300
commite1e3043a51a6f88b3a79b935678464a06c2e469f (patch)
treed0835d0d9b87bace5c56c122375a6f0255e3a22f /build_files
parenta84621347d93bc5b44fc5ec104894e7e1e4583da (diff)
CMake: resolve issue finding mold
The default installation path uses `libexec`, missed this as the package for Arch replaces this with `lib`, now both are checked.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/platform/platform_unix.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 43dbc7c9c98..b6da737af71 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -700,14 +700,18 @@ if(CMAKE_COMPILER_IS_GNUCC)
find_path(
MOLD_BIN_DIR "ld"
HINTS "${MOLD_PREFIX}"
- PATH_SUFFIXES "lib/mold" "lib64/mold"
+ # The default path is `libexec`, Arch Linux for e.g.
+ # replaces this with `lib` so check both.
+ PATH_SUFFIXES "libexec/mold" "lib/mold" "lib64/mold"
NO_DEFAULT_PATH
NO_CACHE
)
if(NOT MOLD_BIN_DIR)
message(STATUS
"The mold linker could not find the directory containing the linker command "
- "(typically \"${MOLD_PREFIX}/lib/mold\"), using system linker.")
+ "(typically "
+ "\"${MOLD_PREFIX}/libexec/mold/ld\") or "
+ "\"${MOLD_PREFIX}/lib/mold/ld\") using system linker.")
set(WITH_LINKER_MOLD OFF)
endif()
unset(MOLD_PREFIX)