From 054c9b480315127e02e516d273ca93a825595451 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Mon, 17 Jul 2023 17:14:22 +0200
Subject: [PATCH] cmake: add symbol versioning
---
CMakeLists.txt | 2 ++
src/SDL_rtf.sym | 14 ++++++++++++++
2 files changed, 16 insertions(+)
create mode 100644 src/SDL_rtf.sym
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 759bf99..7eed890 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,6 +166,8 @@ if(SDL3RTF_BUILD_SHARED_LIBS)
sdl_target_link_options_no_undefined(${sdl3_rtf_target_name})
endif()
+sdl_target_link_option_version_file(${sdl3_rtf_target_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/SDL_rtf.sym")
+
if(SDL3RTF_INSTALL)
install(
TARGETS ${sdl3_rtf_target_name}
diff --git a/src/SDL_rtf.sym b/src/SDL_rtf.sym
new file mode 100644
index 0000000..dc3cdbd
--- /dev/null
+++ b/src/SDL_rtf.sym
@@ -0,0 +1,14 @@
+SDL3_rtf_0.0.0 {
+ global:
+ RTF_CreateContext;
+ RTF_FreeContext;
+ RTF_GetAuthor;
+ RTF_GetHeight;
+ RTF_GetSubject;
+ RTF_GetTitle;
+ RTF_Linked_Version;
+ RTF_Load;
+ RTF_Load_RW;
+ RTF_Render;
+ local: *;
+};