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

62 lines
1.6 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 ++++++++++++
libobs/CMakeLists.txt | 4 ++++
libobs/util/c99defs.h | 2 +-
3 files changed, 17 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
index 835c1b3..dff5370 100644
--- a/deps/obs-scripting/CMakeLists.txt
+++ b/deps/obs-scripting/CMakeLists.txt
@@ -160,6 +160,18 @@ add_library(obs-scripting SHARED
${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
2018-12-16 16:18:48 +00:00
index bddfa5c..41ed749 100644
2017-04-19 20:48:37 +00:00
--- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt
2018-12-16 16:18:48 +00:00
@@ -463,6 +463,10 @@ if(NOT MSVC)
2017-04-19 20:48:37 +00:00
-msse2)
endif()
+if(UNIX)
+ set_source_files_properties(${libobs_SOURCES} PROPERTIES
+ COMPILE_FLAGS "-fvisibility=hidden")
+endif()
target_compile_options(libobs
PUBLIC
diff --git a/libobs/util/c99defs.h b/libobs/util/c99defs.h
2018-02-19 20:07:10 +00:00
index c4ee627..d26b3dd 100644
2017-04-19 20:48:37 +00:00
--- a/libobs/util/c99defs.h
+++ b/libobs/util/c99defs.h
@@ -46,7 +46,7 @@
#define EXPORT __declspec(dllexport)
#else
-#define EXPORT
+#define EXPORT __attribute__((visibility("default")))
#endif
#if _MSC_VER && _MSC_VER < 0x0708