62 lines
1.4 KiB
Diff
62 lines
1.4 KiB
Diff
Description: Various build system fixes
|
|
This fixes issues with underlinking and build libobs with -fvisibility=hidden
|
|
to hide internal symbols. It also disables -msse*.
|
|
Author: Sebastian Ramacher <sramacher@debian.org>
|
|
Last-Update: 2016-02-24
|
|
|
|
--- a/libobs/CMakeLists.txt
|
|
+++ b/libobs/CMakeLists.txt
|
|
@@ -168,6 +168,23 @@
|
|
${libobs_PLATFORM_DEPS}
|
|
${X11_XCB_LIBRARIES})
|
|
|
|
+ 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)
|
|
@@ -401,15 +418,11 @@
|
|
PUBLIC
|
|
HAVE_OBSCONFIG_H)
|
|
|
|
-if(NOT MSVC)
|
|
- target_compile_options(libobs
|
|
- PUBLIC
|
|
- -mmmx
|
|
- -msse
|
|
- -msse2)
|
|
+if(UNIX)
|
|
+ set_source_files_properties(${libobs_SOURCES} PROPERTIES
|
|
+ COMPILE_FLAGS "-fvisibility=hidden")
|
|
endif()
|
|
|
|
-
|
|
target_compile_options(libobs
|
|
PUBLIC
|
|
"${THREADS_DEFINITIONS}")
|
|
--- 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
|