Skip to content

Commit

Permalink
Fix library search path.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbnolok committed Aug 26, 2024
1 parent 60bb843 commit c0727c6
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions cmake/toolchains/Linux-Clang-AArch64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions cmake/toolchains/Linux-Clang-x86.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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)

Expand Down
10 changes: 5 additions & 5 deletions cmake/toolchains/Linux-Clang-x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

Expand Down
6 changes: 3 additions & 3 deletions cmake/toolchains/Linux-GNU-AArch64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions cmake/toolchains/Linux-GNU-x86.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions cmake/toolchains/Linux-GNU-x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

Expand Down

0 comments on commit c0727c6

Please sign in to comment.