game-music-emu: Merge branch 'master' of bitbucket.org:mpyne/game-music-emu (93529)

From ec54b2b63a4a186644cd298710bf59d7e876bf00 Mon Sep 17 00:00:00 2001
From: Wohlstand <[EMAIL REDACTED]>
Date: Fri, 6 Oct 2023 00:30:00 +0300
Subject: [PATCH 1/2] CMake: Fixed the wrong header search result

---
 cmake/FindUNRAR.cmake | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/cmake/FindUNRAR.cmake b/cmake/FindUNRAR.cmake
index 5eafdcc..462cd2b 100644
--- a/cmake/FindUNRAR.cmake
+++ b/cmake/FindUNRAR.cmake
@@ -21,16 +21,18 @@ set(UNRAR_NAMES_DEBUG unrar)
 
 # Try each search configuration.
 foreach(search ${_UNRAR_SEARCHES})
-  find_path(UNRAR_INCLUDE_DIR NAMES unrar.h ${${search}} PATH_SUFFIXES include unrar)
+  find_path(UNRAR_INCLUDE_DIR_UNRAR_H NAMES unrar.h ${${search}} PATH_SUFFIXES include unrar)
 endforeach()
-if(UNRAR_INCLUDE_DIR)
+if(UNRAR_INCLUDE_DIR_UNRAR_H)
   set(RAR_HDR_UNRAR_H 1)
+  set(UNRAR_INCLUDE_DIR ${UNRAR_INCLUDE_DIR_UNRAR_H})
 else()
   foreach(search ${_UNRAR_SEARCHES})
-    find_path(UNRAR_INCLUDE_DIR NAMES dll.hpp ${${search}} PATH_SUFFIXES include unrar)
+    find_path(UNRAR_INCLUDE_DIR_DLL_HPP NAMES dll.hpp ${${search}} PATH_SUFFIXES include unrar)
   endforeach()
-  if(UNRAR_INCLUDE_DIR)
+  if(UNRAR_INCLUDE_DIR_DLL_HPP)
     set(RAR_HDR_DLL_HPP 1)
+    set(UNRAR_INCLUDE_DIR ${UNRAR_INCLUDE_DIR_DLL_HPP})
   endif()
 endif()
 
@@ -48,7 +50,7 @@ endif()
 unset(UNRAR_NAMES)
 unset(UNRAR_NAMES_DEBUG)
 
-mark_as_advanced(UNRAR_INCLUDE_DIR)
+mark_as_advanced(UNRAR_INCLUDE_DIR UNRAR_INCLUDE_DIR_UNRAR_H UNRAR_INCLUDE_DIR_DLL_HPP)
 
 if(UNRAR_INCLUDE_DIR AND EXISTS "${UNRAR_INCLUDE_DIR}/version.hpp")
     file(STRINGS "${UNRAR_INCLUDE_DIR}/version.hpp" UNRAR_H REGEX "^#define RARVER_.*$")

From 1d238afd3cfb5cfb94a4c1fbe10ce8d65d30f787 Mon Sep 17 00:00:00 2001
From: Wohlstand <admin@wohlnet.ru>
Date: Fri, 6 Oct 2023 00:30:43 +0300
Subject: [PATCH 2/2] Fixed the minimum version CMake warning And also, put the
 mimimum version definition at the first line, otherwise, another warning gets
 popped up

---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2615ad5..214a832 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
 # CMake project definition file.
+cmake_minimum_required(VERSION 3.0...3.5 FATAL_ERROR)
 project(libgme)
-cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
 
 include (TestBigEndian)
 include (CheckCXXCompilerFlag)