1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 06:13:36 +08:00

Work in progress

This commit is contained in:
2023-07-11 21:58:58 +08:00
parent bf6808f565
commit cb88f268f6
11 changed files with 209 additions and 75 deletions

View File

@@ -2,10 +2,15 @@ cmake_minimum_required(VERSION 3.2)
project(zstdwrap)
add_library(LZ4 SHARED
add_library(zstdwrap SHARED
dllmain.c zstdwrap.c zstdwrap.h)
target_compile_definitions(zstdwrap PRIVATE ZSTDWRAP_EXPORTS ZSTDLIB_STATIC_API)
if(MSVC)
target_compile_options(zstdwrap PRIVATE /MT)
else()
target_link_options(zstdwrap PRIVATE -static)
endif()
target_link_libraries(zstdwrap PRIVATE zstd)
if(WIN32)
set_target_properties(zstdwrap PROPERTIES PREFIX "")

View File

@@ -9,6 +9,8 @@ BOOL APIENTRY DllMain( HMODULE hModule,
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hModule);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
@@ -16,4 +18,3 @@ BOOL APIENTRY DllMain( HMODULE hModule,
}
return TRUE;
}