diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /libmariadb/cmake/ConnectorName.cmake | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-upstream.tar.xz mariadb-10.5-upstream.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libmariadb/cmake/ConnectorName.cmake')
-rw-r--r-- | libmariadb/cmake/ConnectorName.cmake | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libmariadb/cmake/ConnectorName.cmake b/libmariadb/cmake/ConnectorName.cmake new file mode 100644 index 00000000..357b8ac0 --- /dev/null +++ b/libmariadb/cmake/ConnectorName.cmake @@ -0,0 +1,30 @@ +# +# 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 (PLAFORM_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) + SET(MACHINE_NAME "x64") + 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() |