summaryrefslogtreecommitdiffstats
path: root/libmariadb/cmake/export.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /libmariadb/cmake/export.cmake
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libmariadb/cmake/export.cmake')
-rw-r--r--libmariadb/cmake/export.cmake30
1 files changed, 30 insertions, 0 deletions
diff --git a/libmariadb/cmake/export.cmake b/libmariadb/cmake/export.cmake
new file mode 100644
index 00000000..5ae2b74f
--- /dev/null
+++ b/libmariadb/cmake/export.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(CREATE_EXPORT_FILE op outfile version symbols alias_version)
+ IF(WIN32)
+ SET(EXPORT_CONTENT "EXPORTS\n")
+ FOREACH(exp_symbol ${symbols})
+ SET(EXPORT_CONTENT ${EXPORT_CONTENT} "${exp_symbol}\n")
+ ENDFOREACH()
+ ELSE()
+ SET(EXPORT_CONTENT "VERSION {\n${version} {\nglobal:\n")
+ FOREACH(exp_symbol ${symbols})
+ SET(EXPORT_CONTENT "${EXPORT_CONTENT} ${exp_symbol}\\;\n")
+ ENDFOREACH()
+ SET(EXPORT_CONTENT "${EXPORT_CONTENT}local:\n *\\;\n}\\;\n")
+ IF ("${alias_version}" STRGREATER "")
+ SET(EXPORT_CONTENT "${EXPORT_CONTENT}${alias_version} {\n}\\;\n}\\;\n")
+ FOREACH(exp_symbol ${symbols})
+ SET(EXPORT_CONTENT "${EXPORT_CONTENT}\"${exp_symbol}@${alias_version}\" = ${exp_symbol}\\;\n")
+ ENDFOREACH()
+ ELSE()
+ SET(EXPORT_CONTENT "${EXPORT_CONTENT}}\\;\n")
+ ENDIF()
+ ENDIF()
+ FILE(${op} ${CMAKE_CURRENT_BINARY_DIR}/${outfile} ${EXPORT_CONTENT})
+ENDMACRO()