From 8779eac3b8afb1b862b85ef08ceec3305d054e09 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 19 May 2025 08:55:14 -0700 Subject: [PATCH] Do not add a 64 suffix to the library name if the user-provided suffix already contains it --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f94c4c474..7094eb5b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,12 @@ message(WARNING "CMake support is experimental. It does not yet support all buil include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake") include("${PROJECT_SOURCE_DIR}/cmake/system.cmake") -set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE}) +string(FIND "${LIBNAMESUFFIX}" "${SUFFIX64_UNDERSCORE}" HAVE64) +if (${HAVE64} GREATER -1) + set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}) +else () + set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE}) +endif () set(BLASDIRS interface driver/level2 driver/level3 driver/others) @@ -716,4 +721,5 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake DESTINATION ${CMAKECONFIG_INSTALL_DIR}) install(EXPORT "${PN}${SUFFIX64}Targets" NAMESPACE "${PN}${SUFFIX64}::" - DESTINATION ${CMAKECONFIG_INSTALL_DIR}) \ No newline at end of file + DESTINATION ${CMAKECONFIG_INSTALL_DIR}) +