File system-gme.patch of Package zmusic

From: Jan Engelhardt <jengelh@inai.de>
Date: 2019-12-18 23:10:30.098185171 +0100

Use GME system libraries instead of bundled code.

How GME is released does not matter. The job of a distro is to string
together all its GME users with whatever GME version was chosen by
the distro. ABI incompatibilites are addressed, else our own stack
wouldn't work.

---
 thirdparty/CMakeLists.txt |    6 ++++++
 1 file changed, 6 insertions(+)

Index: thirdparty/CMakeLists.txt
===================================================================
--- thirdparty/CMakeLists.txt.orig
+++ thirdparty/CMakeLists.txt
@@ -25,6 +25,11 @@ endif()
 #option(FORCE_INTERNAL_GME "Use internal gme (it is highly unlikely this should be turned off)" ON)
 #mark_as_advanced(FORCE_INTERNAL_GME GME_INCLUDE_DIR GME_LIBRARY)
 #find_package(GME QUIET)
+include(FindPkgConfig)
+pkg_check_modules(GME libgme)
+message(STATUS "Using system gme library, includes found at ${GME_INCLUDE_DIRS}")
+determine_package_config_dependency(ZMUSIC_PACKAGE_DEPENDENCIES TARGET gme MODULE GME)
+if(FALSE)
 #if(GME_FOUND AND NOT FORCE_INTERNAL_GME)
 #	message(STATUS "Using system gme library, includes found at ${GME_INCLUDE_DIRS}")
 #	set_property(TARGET gme PROPERTY IMPORTED_GLOBAL TRUE)
@@ -37,6 +42,7 @@ endif()
 	mark_as_advanced(GME_YM2612_EMU)
 	add_subdirectory(game-music-emu)
 #endif()
+endif()
 
 add_subdirectory(dumb)
 add_subdirectory(adlmidi)
openSUSE Build Service is sponsored by