yolobs-studio/debian/patches/0002-Hide-internal-symbols.patch

63 lines
1.7 KiB
Diff
Raw Normal View History

2017-04-19 20:48:37 +00:00
From: Sebastian Ramacher <sramacher@debian.org>
Date: Wed, 19 Apr 2017 21:45:40 +0200
Subject: Hide internal symbols
---
2018-12-16 17:05:42 +00:00
deps/obs-scripting/CMakeLists.txt | 12 ++++++++++++
2020-03-25 20:27:47 +00:00
libobs/CMakeLists.txt | 5 +++++
2018-12-16 17:05:42 +00:00
libobs/util/c99defs.h | 2 +-
2020-03-25 20:27:47 +00:00
3 files changed, 18 insertions(+), 1 deletion(-)
2017-04-19 20:48:37 +00:00
2018-12-16 17:05:42 +00:00
diff --git a/deps/obs-scripting/CMakeLists.txt b/deps/obs-scripting/CMakeLists.txt
2020-03-25 20:27:47 +00:00
index 0421ec9..165b2d9 100644
2018-12-16 17:05:42 +00:00
--- a/deps/obs-scripting/CMakeLists.txt
+++ b/deps/obs-scripting/CMakeLists.txt
2020-03-25 20:27:47 +00:00
@@ -193,6 +193,18 @@ add_library(obs-scripting SHARED
2018-12-16 17:05:42 +00:00
${SWIG_LUA_RUNTIME}
)
+if(UNIX)
+ set_source_files_properties(${obs-scripting_SOURCES}
+ ${obs-scripting_HEADERS}
+ ${obs-scripting-python_SOURCES}
+ ${obs-scripting-python_HEADERS}
+ ${obs-scripting-lua_SOURCES}
+ ${obs-scripting-lua_HEADERS}
+ ${SWIG_PY_RUNTIME}
+ ${SWIG_LUA_RUNTIME}
+ PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
+endif()
+
target_link_libraries(obs-scripting
libobs
${LUAJIT_LIBRARIES}
2017-04-19 20:48:37 +00:00
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
2020-03-25 20:27:47 +00:00
index 84889e6..5ebd1eb 100644
2017-04-19 20:48:37 +00:00
--- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt
2020-03-25 20:27:47 +00:00
@@ -481,6 +481,11 @@ target_compile_options(libobs
PUBLIC
${ARCH_SIMD_FLAGS})
2017-04-19 20:48:37 +00:00
+if(UNIX)
+ set_source_files_properties(${libobs_SOURCES} PROPERTIES
+ COMPILE_FLAGS "-fvisibility=hidden")
+endif()
2020-03-25 20:27:47 +00:00
+
2017-04-19 20:48:37 +00:00
target_compile_options(libobs
PUBLIC
2020-03-25 20:27:47 +00:00
"${THREADS_DEFINITIONS}")
2017-04-19 20:48:37 +00:00
diff --git a/libobs/util/c99defs.h b/libobs/util/c99defs.h
2020-03-25 20:27:47 +00:00
index f84432a..1fb4821 100644
2017-04-19 20:48:37 +00:00
--- a/libobs/util/c99defs.h
+++ b/libobs/util/c99defs.h
2020-03-25 20:27:47 +00:00
@@ -34,7 +34,7 @@
#ifdef _MSC_VER
2017-04-19 20:48:37 +00:00
#define EXPORT __declspec(dllexport)
#else
-#define EXPORT
+#define EXPORT __attribute__((visibility("default")))
#endif
2020-03-25 20:27:47 +00:00
#include <stddef.h>