From 50885f7cd7e0519c96b0c95fce9ba6bf69502cf7 Mon Sep 17 00:00:00 2001 From: vnugent Date: Mon, 8 Jan 2024 22:04:41 -0500 Subject: Some net 8.0 goodies like sha3 support --- lib/Net.Compression/vnlib_compress/CMakeLists.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'lib/Net.Compression/vnlib_compress') diff --git a/lib/Net.Compression/vnlib_compress/CMakeLists.txt b/lib/Net.Compression/vnlib_compress/CMakeLists.txt index a5dfaa3..2eb234e 100644 --- a/lib/Net.Compression/vnlib_compress/CMakeLists.txt +++ b/lib/Net.Compression/vnlib_compress/CMakeLists.txt @@ -11,7 +11,7 @@ set(VNLIB_COMPRESS_SOURCES compression.c) #set options for enable botli and zlib option(ENABLE_BROTLI "Enable brotli compression" ON) option(ENABLE_ZLIB "Enable zlib compression" ON) -option(ENABLE_RPMALLOC "Link local vnlib_rpmalloc allocator" OFF) +option(ENABLE_RPMALLOC "Enable local source code vnlib_rpmalloc memory allocator" OFF) #add feature specific source files to the project if(ENABLE_BROTLI) @@ -33,7 +33,7 @@ add_library(${CMAKE_PROJECT_NAME}_static STATIC ${VNLIB_COMPRESS_SOURCES} ${COMP #if on unix lib will be appended, so we can adjust if(UNIX) - set_target_properties(${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_NAME}_static PROPERTIES OUTPUT_NAME _vncompress) + set_target_properties(${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_NAME}_static PROPERTIES OUTPUT_NAME vn_compress) endif() @@ -281,6 +281,22 @@ if(ENABLE_ZLIB) target_link_libraries(${CMAKE_PROJECT_NAME} lib_deflate) endif() +if(NATIVE_HEAP_LIB_PATH) + + #Include the nativeheap api header + include_directories(${NATIVE_HEAP_INCLUDES}) + + #If manual heap linking is enabled, we need to link the native heap library + target_link_libraries(${CMAKE_PROJECT_NAME} ${NATIVE_HEAP_LIB_PATH}) + + #Disable rpmalloc if we are linking a custom native heap + set(ENABLE_RPMALLOC OFF) + + #add defintion to enable custom malloc heap overrides + target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE VNLIB_CUSTOM_MALLOC_ENABLE) + +endif() + #Add support for rpmalloc memmory allocator if(ENABLE_RPMALLOC) -- cgit