From 7da9a2f0d33677c1921c1ee3e76ab4ee3701e712 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Sun, 26 Apr 2020 23:57:12 +0200 Subject: [PATCH] libobs: add ppc64(le) specific flags to libobs.pc -DNO_WARN_X86_INTRINSICS -mvsx flags are necessary on PPC64(LE), but those flags haven't been added yet to libobs.pc, making some plugins fail to build. --- libobs/CMakeLists.txt | 3 +++ libobs/libobs.pc.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt index 84889e614..14b5f7ff6 100644 --- a/libobs/CMakeLists.txt +++ b/libobs/CMakeLists.txt @@ -465,6 +465,9 @@ if(UNIX AND NOT APPLE) foreach(LIB "obs" "rt") set(PRIVATE_LIBS "${PRIVATE_LIBS} -l${LIB}") endforeach() + if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64(le)?") + set(PPC64_CFLAGS "-DNO_WARN_X86_INTRINSICS -mvsx") + endif() CONFIGURE_FILE("libobs.pc.in" "libobs.pc" @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libobs.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") endif() diff --git a/libobs/libobs.pc.in b/libobs/libobs.pc.in index f6c471bae..76c13e644 100644 --- a/libobs/libobs.pc.in +++ b/libobs/libobs.pc.in @@ -7,5 +7,5 @@ Name: libobs Description: OBS Studio Library Version: @OBS_VERSION@ Requires: x11 -Cflags: -I${includedir} +Cflags: -I${includedir} @PPC64_CFLAGS@ Libs: -L${libdir} @PRIVATE_LIBS@