From ca0db39027f7042376e8cc5e6571fc464f3d0eda Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Sat, 13 May 2023 21:39:55 -0700 Subject: [PATCH] Fix BUILD_SHARED_LIBS build option on Windows This commit fixes the build error "unresolved external symbol GetModuleInformation" when the project is built on Windows with BUILD_SHARED_LIBS enabled. Gzdoom must be linked against "psapi". When BUILD_SHARED_LIBS is off (default), it gets linked because the discord-rpc library is linked against it and then statically linked into the project. The issue is fixed by making Gzdoom itself explicitly link against "psapi" too. --- src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e05d7c094..cf254ad6a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -56,6 +56,7 @@ if( WIN32 ) add_definitions( -D_WIN32 ) set( PROJECT_LIBRARIES + psapi wsock32 winmm dinput8