aboutsummaryrefslogtreecommitdiff
path: root/lib/Net.Compression/vnlib_compress
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-01-08 22:04:41 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2024-01-08 22:04:41 -0500
commit50885f7cd7e0519c96b0c95fce9ba6bf69502cf7 (patch)
tree11db78a9c2b9da56de92ebe27183c0ce12098947 /lib/Net.Compression/vnlib_compress
parent86c0532edc0042b26dda5f1ca41abdf80db46414 (diff)
Some net 8.0 goodies like sha3 support
Diffstat (limited to 'lib/Net.Compression/vnlib_compress')
-rw-r--r--lib/Net.Compression/vnlib_compress/CMakeLists.txt20
1 files changed, 18 insertions, 2 deletions
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)