From 235f41ec0509d67fcc1cd7c5b93a64c813e062cd Mon Sep 17 00:00:00 2001 From: Retro <44505837+dankmolot@users.noreply.github.com> Date: Mon, 3 Jul 2023 16:03:59 +0300 Subject: [PATCH] Add lzma library only for OSX build --- source/CMakeLists.txt | 5 ++++- source/main.cpp | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 0a1b21f..4d3de33 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -21,11 +21,14 @@ if(NOT ${CLIENT_DLL}) sourcesdk::common sourcesdk::tier0 sourcesdk::tier1 - sourcesdk::lzma efsw moonengine ) + + if(APPLE) + target_link_libraries(moonloader PRIVATE sourcesdk::lzma) + endif() else() target_link_libraries(moonloader PRIVATE gmod::common diff --git a/source/main.cpp b/source/main.cpp index b0cd434..dd5b027 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -214,10 +214,9 @@ GMOD_MODULE_CLOSE() { g_IncludedFiles.erase(ILUA); g_Filesystem->RemoveSearchPath("garrysmod/" CACHE_PATH_LUA, ILUA->GetPathID()); - if (ILUA->IsServer()) + if (ILUA->IsServer()) { g_Filesystem->RemoveSearchPath("garrysmod/" CACHE_PATH_LUA, "lcl"); - if (ILUA->IsServer()) { AutoRefresh::Deinitialize(); g_EngineServer = nullptr; }