game-music-emu: CMake: Fixed build of the static library

From 10ab7303d64000310d6cdc66191ba9f512ac700c Mon Sep 17 00:00:00 2001
From: Wohlstand <[EMAIL REDACTED]>
Date: Tue, 24 Oct 2023 02:36:08 +0300
Subject: [PATCH] CMake: Fixed build of the static library

---
 gme/CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gme/CMakeLists.txt b/gme/CMakeLists.txt
index 3ee49a2..fb79cc6 100644
--- a/gme/CMakeLists.txt
+++ b/gme/CMakeLists.txt
@@ -188,7 +188,11 @@ endif()
 # On some platforms we may need to change headers or whatnot based on whether
 # we're building the library or merely using the library. The following is
 # only defined when building the library to allow us to tell which is which.
-set_property(TARGET gme PROPERTY DEFINE_SYMBOL BLARGG_BUILD_DLL)
+if(BUILD_SHARED_LIBS)
+    set_property(TARGET gme PROPERTY DEFINE_SYMBOL BLARGG_BUILD_DLL)
+else()
+    target_compile_definitions(gme PRIVATE -DBLARGG_BUILD_DLL)
+endif()
 
 target_compile_definitions(gme PRIVATE GEN_TYPES_H)
 if(WORDS_BIGENDIAN)