From c0727c690d2658b36613be9dcddfe85c0cd30c6b Mon Sep 17 00:00:00 2001 From: cbnolok Date: Mon, 26 Aug 2024 17:21:45 +0200 Subject: [PATCH] Fix library search path. --- cmake/toolchains/Linux-Clang-AArch64.cmake | 6 +++--- cmake/toolchains/Linux-Clang-x86.cmake | 14 +++++++------- cmake/toolchains/Linux-Clang-x86_64.cmake | 10 +++++----- cmake/toolchains/Linux-GNU-AArch64.cmake | 6 +++--- cmake/toolchains/Linux-GNU-x86.cmake | 14 +++++++------- cmake/toolchains/Linux-GNU-x86_64.cmake | 10 +++++----- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/cmake/toolchains/Linux-Clang-AArch64.cmake b/cmake/toolchains/Linux-Clang-AArch64.cmake index c3a7fb8f1..ca47e0bbe 100644 --- a/cmake/toolchains/Linux-Clang-AArch64.cmake +++ b/cmake/toolchains/Linux-Clang-AArch64.cmake @@ -39,9 +39,9 @@ function (toolchain_after_project) else () # possible native/host lib locations set (lib_search_paths - "/usr/aarch64-linux-gnu/libmariadb3" - "/usr/aarch64-linux-gnu/mysql" - "/usr/aarch64-linux-gnu" + "/usr/lib/aarch64-linux-gnu/libmariadb3" + "/usr/lib/aarch64-linux-gnu/mysql" + "/usr/lib/aarch64-linux-gnu" "/usr/lib64/mysql" "/usr/lib64" "/usr/lib/mysql" diff --git a/cmake/toolchains/Linux-Clang-x86.cmake b/cmake/toolchains/Linux-Clang-x86.cmake index 0cc39338d..edcfb7904 100644 --- a/cmake/toolchains/Linux-Clang-x86.cmake +++ b/cmake/toolchains/Linux-Clang-x86.cmake @@ -43,12 +43,12 @@ function (toolchain_after_project) ) else (CROSSCOMPILING_ARCH) set (local_lib_search_paths - "/usr/i686-linux-gnu/libmariadb3" - "/usr/i686-linux-gnu/mysql" - "/usr/i686-linux-gnu" - "/usr/i386-linux-gnu/libmariadb3" - "/usr/i386-linux-gnu/mysql" - "/usr/i386-linux-gnu" + "/usr/lib/i686-linux-gnu/libmariadb3" + "/usr/lib/i686-linux-gnu/mysql" + "/usr/lib/i686-linux-gnu" + "/usr/lib/i386-linux-gnu/libmariadb3" + "/usr/lib/i386-linux-gnu/mysql" + "/usr/lib/i386-linux-gnu" "/usr/lib32/mysql" "/usr/lib32" ) @@ -67,7 +67,7 @@ function (toolchain_after_project) set (lib_search_paths ${local_lib_search_paths} ${local_extra_lib_search_paths} - CACHE STRING "Library search paths (hint)" FORCE + CACHE STRING "Library search paths" FORCE ) endif (CROSSCOMPILING_ARCH) diff --git a/cmake/toolchains/Linux-Clang-x86_64.cmake b/cmake/toolchains/Linux-Clang-x86_64.cmake index 874b3940e..ca95c9128 100644 --- a/cmake/toolchains/Linux-Clang-x86_64.cmake +++ b/cmake/toolchains/Linux-Clang-x86_64.cmake @@ -36,19 +36,19 @@ function (toolchain_after_project) "/usr/x86_64-linux-gnu/usr/lib/libmariadb3" "/usr/x86_64-linux-gnu/usr/lib/mysql" "/usr/x86_64-linux-gnu/usr/lib/" - CACHE STRING "Library search paths (hint)" FORCE + CACHE STRING "Library search paths" FORCE ) else () # possible native/host lib locations set (lib_search_paths - "/usr/x86_64-linux-gnu/libmariadb3" - "/usr/x86_64-linux-gnu/mysql" - "/usr/x86_64-linux-gnu" + "/usr/lib/x86_64-linux-gnu/libmariadb3" + "/usr/lib/x86_64-linux-gnu/mysql" + "/usr/lib/x86_64-linux-gnu" "/usr/lib64/mysql" "/usr/lib64" "/usr/lib/mysql" "/usr/lib" - CACHE STRING "Library search paths (hint)" FORCE + CACHE STRING "Library search paths" FORCE ) endif () diff --git a/cmake/toolchains/Linux-GNU-AArch64.cmake b/cmake/toolchains/Linux-GNU-AArch64.cmake index 9784f47d9..7b950296f 100644 --- a/cmake/toolchains/Linux-GNU-AArch64.cmake +++ b/cmake/toolchains/Linux-GNU-AArch64.cmake @@ -42,9 +42,9 @@ function (toolchain_after_project) else () # possible native/host lib locations set (lib_search_paths - "/usr/aarch64-linux-gnu/libmariadb3" - "/usr/aarch64-linux-gnu/mysql" - "/usr/aarch64-linux-gnu" + "/usr/lib/aarch64-linux-gnu/libmariadb3" + "/usr/lib/aarch64-linux-gnu/mysql" + "/usr/lib/aarch64-linux-gnu" "/usr/lib64/mysql" "/usr/lib64" "/usr/lib/mysql" diff --git a/cmake/toolchains/Linux-GNU-x86.cmake b/cmake/toolchains/Linux-GNU-x86.cmake index 9901f44cc..9ffd7aeed 100644 --- a/cmake/toolchains/Linux-GNU-x86.cmake +++ b/cmake/toolchains/Linux-GNU-x86.cmake @@ -47,19 +47,19 @@ function (toolchain_after_project) ) else (CROSSCOMPILING_ARCH) set (local_lib_search_paths - "/usr/i686-linux-gnu/libmariadb3" - "/usr/i686-linux-gnu/mysql" - "/usr/i686-linux-gnu" - "/usr/i386-linux-gnu/libmariadb3" - "/usr/i386-linux-gnu/mysql" - "/usr/i386-linux-gnu" + "/usr/lib/i686-linux-gnu/libmariadb3" + "/usr/lib/i686-linux-gnu/mysql" + "/usr/lib/i686-linux-gnu" + "/usr/lib/i386-linux-gnu/libmariadb3" + "/usr/lib/i386-linux-gnu/mysql" + "/usr/lib/i386-linux-gnu" "/usr/lib32/mysql" "/usr/lib32" ) if ("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "x86_64") # I'm compiling for x86 on an x86_64 host. - set (CMAKE_LIBRARY_PATH ${local_lib_search_paths} CACHE PATH "" + set (CMAKE_LIBRARY_PATH ${local_lib_search_paths} CACHE PATH "") else () # I'm compiling for x86 on an x86 OS (32 bits), so natively: i have libs on /usr/lib and not /usr/lib32. set (local_extra_lib_search_paths diff --git a/cmake/toolchains/Linux-GNU-x86_64.cmake b/cmake/toolchains/Linux-GNU-x86_64.cmake index c43e54d1a..a2c2cdd68 100644 --- a/cmake/toolchains/Linux-GNU-x86_64.cmake +++ b/cmake/toolchains/Linux-GNU-x86_64.cmake @@ -40,19 +40,19 @@ function (toolchain_after_project) "/usr/x86_64-linux-gnu/usr/lib/libmariadb3" "/usr/x86_64-linux-gnu/usr/lib/mysql" "/usr/x86_64-linux-gnu/usr/lib/" - CACHE STRING "Library search paths (hint)" FORCE + CACHE STRING "Library search paths" FORCE ) else () # possible native/host lib locations set (lib_search_paths - "/usr/x86_64-linux-gnu/libmariadb3" - "/usr/x86_64-linux-gnu/mysql" - "/usr/x86_64-linux-gnu" + "/usr/lib/x86_64-linux-gnu/libmariadb3" + "/usr/lib/x86_64-linux-gnu/mysql" + "/usr/lib/x86_64-linux-gnu" "/usr/lib64/mysql" "/usr/lib64" "/usr/lib/mysql" "/usr/lib" - CACHE STRING "Library search paths (hint)" FORCE + CACHE STRING "Library search paths" FORCE ) endif ()