From 06eaf7232e9a920468c0f8d74dcf2fe8b555501c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:24:36 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- libmariadb/cmake/ConnectorName.cmake | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 libmariadb/cmake/ConnectorName.cmake (limited to 'libmariadb/cmake/ConnectorName.cmake') diff --git a/libmariadb/cmake/ConnectorName.cmake b/libmariadb/cmake/ConnectorName.cmake new file mode 100644 index 00000000..9cbd87e3 --- /dev/null +++ b/libmariadb/cmake/ConnectorName.cmake @@ -0,0 +1,34 @@ +# +# Copyright (C) 2013-2016 MariaDB Corporation AB +# +# Redistribution and use is allowed according to the terms of the New +# BSD license. +# For details see the COPYING-CMAKE-SCRIPTS file. +# +MACRO(GET_CONNECTOR_PACKAGE_NAME name) +# check if we have 64bit +IF(SIZEOF_VOIDP EQUAL 8) + SET(IS64 1) +ENDIF() + +SET (PLATFORM_NAME ${CMAKE_SYSTEM_NAME}) +SET (MACHINE_NAME ${CMAKE_SYSTEM_PROCESSOR}) +SET (CONCAT_SIGN "-") + +IF(CMAKE_SYSTEM_NAME MATCHES "Windows") + SET(PLATFORM_NAME "win") + SET(CONCAT_SIGN "") + IF(IS64) + IF(CMAKE_C_COMPILER_ARCHITECTURE_ID) + STRING(TOLOWER "${CMAKE_C_COMPILER_ARCHITECTURE_ID}" MACHINE_NAME) + ELSE() + SET(MACHINE_NAME x64) + ENDIF() + ELSE() + SET(MACHINE_NAME "32") + ENDIF() +ENDIF() + +SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}") +STRING(TOLOWER ${product_name} ${name}) +ENDMACRO() -- cgit v1.2.3