From 18287e2ed4bc4393827d2bdb73f87a7b26fc5bdf Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 30 Mar 2023 23:44:26 -0700 Subject: [PATCH] cmake: always build libgme, even if SRB2_CONFIG_SYSTEM_LIBRARIES --- CMakeLists.txt | 7 ++++++- thirdparty/CMakeLists.txt | 2 +- thirdparty/cpm-libgme.cmake | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdbb760c3..ce5c44f78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,12 @@ if("${SRB2_CONFIG_SYSTEM_LIBRARIES}") find_package(PNG REQUIRED) find_package(SDL2 REQUIRED) find_package(CURL REQUIRED) - find_package(GME REQUIRED) + + # libgme defaults to "Nuked" YM2612 emulator, which is + # very SLOW. The system library probably uses the + # default so just always build it. + #find_package(GME REQUIRED) + if (SRB2_CONFIG_ENABLE_WEBM_MOVIES) find_package(VPX REQUIRED) find_package(Vorbis REQUIRED) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 6cfd45475..f36851150 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -14,9 +14,9 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}") include("cpm-zlib.cmake") include("cpm-png.cmake") include("cpm-curl.cmake") - include("cpm-libgme.cmake") endif() +include("cpm-libgme.cmake") include("cpm-glm.cmake") include("cpm-rapidjson.cmake") include("cpm-discordrpc.cmake") diff --git a/thirdparty/cpm-libgme.cmake b/thirdparty/cpm-libgme.cmake index 1786ad0ec..f15bc3b31 100644 --- a/thirdparty/cpm-libgme.cmake +++ b/thirdparty/cpm-libgme.cmake @@ -11,5 +11,6 @@ CPMAddPackage( if(libgme_ADDED) target_compile_features(gme PRIVATE cxx_std_11) - target_link_libraries(gme PRIVATE ZLIB::ZLIB) + # libgme's CMakeLists.txt already links this + #target_link_libraries(gme PRIVATE ZLIB::ZLIB) endif()