Skip to content

Commit 8779eac

Browse files
authored
Do not add a 64 suffix to the library name if the user-provided suffix already contains it
1 parent 3473118 commit 8779eac

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ message(WARNING "CMake support is experimental. It does not yet support all buil
123123
include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
124124
include("${PROJECT_SOURCE_DIR}/cmake/system.cmake")
125125

126-
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE})
126+
string(FIND "${LIBNAMESUFFIX}" "${SUFFIX64_UNDERSCORE}" HAVE64)
127+
if (${HAVE64} GREATER -1)
128+
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX})
129+
else ()
130+
set(OpenBLAS_LIBNAME ${LIBNAMEPREFIX}openblas${LIBNAMESUFFIX}${SUFFIX64_UNDERSCORE})
131+
endif ()
127132

128133
set(BLASDIRS interface driver/level2 driver/level3 driver/others)
129134

@@ -716,4 +721,5 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
716721
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
717722
install(EXPORT "${PN}${SUFFIX64}Targets"
718723
NAMESPACE "${PN}${SUFFIX64}::"
719-
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
724+
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
725+

0 commit comments

Comments
 (0)