From 36f96cb766a83a82e2fef7cdbbc7bcd2cd47d3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 21 Jan 2014 21:13:55 +0200 Subject: [PATCH 1/2] Don't include the headers for dynamically loading the VP library if NO_DYNAMIC_VP is defined bundleloader.h, which is included if MACOS is defined, defines inline functions that reference bundle loading system functions, which requires linking to the core foundation framework. Avoid requiring linking to extra libraries/frameworks if NO_DYNAMIC_VP is defined. --- codec/encoder/core/src/wels_preprocess.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codec/encoder/core/src/wels_preprocess.cpp b/codec/encoder/core/src/wels_preprocess.cpp index 5d886e80..718158a0 100644 --- a/codec/encoder/core/src/wels_preprocess.cpp +++ b/codec/encoder/core/src/wels_preprocess.cpp @@ -30,6 +30,7 @@ * */ +#ifndef NO_DYNAMIC_VP #if defined(_WIN32) #include #elif defined(MACOS) @@ -37,6 +38,7 @@ #elif defined(__GNUC__) #include #endif +#endif #include #include From 797a19e3670bd6a447711ce94ea859105be15c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 21 Jan 2014 21:15:53 +0200 Subject: [PATCH 2/2] Define MACOS when building for OS X The library uses this define to enable OS X specific functionality in general, even if none of those snippets actually have been strictly required so far. --- build/platform-darwin.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/platform-darwin.mk b/build/platform-darwin.mk index 91ef1775..e5a6ad1e 100644 --- a/build/platform-darwin.mk +++ b/build/platform-darwin.mk @@ -1,6 +1,6 @@ ASM = nasm -CFLAGS += -Wno-deprecated-declarations -Werror -fPIC +CFLAGS += -Wno-deprecated-declarations -Werror -fPIC -DMACOS LDFLAGS += -lpthread ASMFLAGS += --prefix _ -DNOPREFIX ifeq ($(ENABLE64BIT), Yes)