2017-04-19 19:47:41 +00:00
|
|
|
From: Sebastian Ramacher <sramacher@debian.org>
|
|
|
|
Date: Wed, 19 Apr 2017 21:45:40 +0200
|
|
|
|
Subject: Build system fixes
|
2016-02-23 23:30:24 +00:00
|
|
|
|
2017-04-19 19:47:41 +00:00
|
|
|
---
|
|
|
|
libobs/CMakeLists.txt | 27 ++++++++++++++++++++-------
|
|
|
|
libobs/util/c99defs.h | 2 +-
|
|
|
|
2 files changed, 21 insertions(+), 8 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
|
|
|
|
index cd2b80e..de274dd 100644
|
2016-02-23 23:30:24 +00:00
|
|
|
--- a/libobs/CMakeLists.txt
|
|
|
|
+++ b/libobs/CMakeLists.txt
|
2017-04-19 19:47:41 +00:00
|
|
|
@@ -168,6 +168,23 @@ elseif(UNIX)
|
2017-04-15 19:14:54 +00:00
|
|
|
${libobs_PLATFORM_DEPS}
|
|
|
|
${X11_XCB_LIBRARIES})
|
2016-02-23 23:30:24 +00:00
|
|
|
|
|
|
|
+ include_directories(
|
|
|
|
+ ${XCB_INCLUDE_DIRS}
|
|
|
|
+ ${X11_XCB_INCLUDE_DIRS}
|
|
|
|
+ ${X11_X11_INCLUDE_PATH})
|
|
|
|
+
|
|
|
|
+ add_definitions(
|
|
|
|
+ ${XCB_DEFINITIONS}
|
|
|
|
+ ${X11_XCB_DEFINITIONS})
|
|
|
|
+
|
|
|
|
+ set(libobs_PLATFORM_DEPS
|
|
|
|
+ ${libobs_PLATFORM_DEPS}
|
|
|
|
+ ${XCB_LIBRARIES}
|
|
|
|
+ ${X11_XCB_LIBRARIES}
|
|
|
|
+ ${X11_X11_LIB}
|
|
|
|
+ m
|
|
|
|
+ dl)
|
|
|
|
+
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
|
|
|
# use the sysinfo compatibility library on bsd
|
|
|
|
find_package(Libsysinfo REQUIRED)
|
2017-04-19 19:47:41 +00:00
|
|
|
@@ -401,15 +418,11 @@ target_compile_definitions(libobs
|
2016-02-25 19:41:52 +00:00
|
|
|
PUBLIC
|
|
|
|
HAVE_OBSCONFIG_H)
|
2016-02-23 23:30:24 +00:00
|
|
|
|
2016-02-25 19:41:52 +00:00
|
|
|
-if(NOT MSVC)
|
|
|
|
- target_compile_options(libobs
|
|
|
|
- PUBLIC
|
|
|
|
- -mmmx
|
|
|
|
- -msse
|
|
|
|
- -msse2)
|
2016-02-23 23:30:24 +00:00
|
|
|
+if(UNIX)
|
|
|
|
+ set_source_files_properties(${libobs_SOURCES} PROPERTIES
|
|
|
|
+ COMPILE_FLAGS "-fvisibility=hidden")
|
2016-02-25 19:41:52 +00:00
|
|
|
endif()
|
2016-02-23 23:30:24 +00:00
|
|
|
|
2016-02-25 19:41:52 +00:00
|
|
|
-
|
2016-02-23 23:30:24 +00:00
|
|
|
target_compile_options(libobs
|
|
|
|
PUBLIC
|
2016-02-25 19:41:52 +00:00
|
|
|
"${THREADS_DEFINITIONS}")
|
2017-04-19 19:47:41 +00:00
|
|
|
diff --git a/libobs/util/c99defs.h b/libobs/util/c99defs.h
|
|
|
|
index 43d52c8..4890858 100644
|
2016-02-23 23:30:24 +00:00
|
|
|
--- a/libobs/util/c99defs.h
|
|
|
|
+++ b/libobs/util/c99defs.h
|
2017-04-15 19:14:54 +00:00
|
|
|
@@ -46,7 +46,7 @@
|
2016-02-23 23:30:24 +00:00
|
|
|
|
|
|
|
#define EXPORT __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
-#define EXPORT
|
|
|
|
+#define EXPORT __attribute__((visibility("default")))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _MSC_VER && _MSC_VER < 0x0708
|