From 21684586014cb4de9848edc0a43f51c7f12f752e Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 4 Dec 2018 08:39:53 -0800 Subject: [PATCH] UI: Add /LARGEADDRESSAWARE for MSVC x86 executable Use /LARGEADDRESSAWARE linker option when compiling 32bit executables on Windows. Closes obsproject/obs-studio#1546 --- UI/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/CMakeLists.txt b/UI/CMakeLists.txt index c0b87c41f..edfb7f1b1 100644 --- a/UI/CMakeLists.txt +++ b/UI/CMakeLists.txt @@ -69,6 +69,10 @@ if(WIN32) crypt32 blake2 ${OBS_JANSSON_IMPORT}) + + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") + endif() elseif(APPLE) set(obs_PLATFORM_SOURCES platform-osx.mm)