Add external_mallocng module
This commit is contained in:
parent
42d3840cde
commit
5318ac7c54
2 changed files with 41 additions and 0 deletions
3
external/CMakeLists.txt
vendored
3
external/CMakeLists.txt
vendored
|
|
@ -41,6 +41,9 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
add_checked_subdirectory(kwayland)
|
add_checked_subdirectory(kwayland)
|
||||||
endif()
|
endif()
|
||||||
add_checked_subdirectory(lz4)
|
add_checked_subdirectory(lz4)
|
||||||
|
if (LINUX)
|
||||||
|
add_checked_subdirectory(mallocng)
|
||||||
|
endif()
|
||||||
add_checked_subdirectory(minizip)
|
add_checked_subdirectory(minizip)
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
add_checked_subdirectory(nimf_qt5)
|
add_checked_subdirectory(nimf_qt5)
|
||||||
|
|
|
||||||
38
external/mallocng/CMakeLists.txt
vendored
Normal file
38
external/mallocng/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
# This file is part of Desktop App Toolkit,
|
||||||
|
# a set of libraries for developing nice desktop applications.
|
||||||
|
#
|
||||||
|
# For license and copyright information please follow this link:
|
||||||
|
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
|
|
||||||
|
add_library(external_mallocng STATIC)
|
||||||
|
add_library(desktop-app::external_mallocng ALIAS external_mallocng)
|
||||||
|
init_target(external_mallocng "(external)")
|
||||||
|
|
||||||
|
set(mallocng_loc ${third_party_loc}/mallocng)
|
||||||
|
|
||||||
|
nice_target_sources(external_mallocng ${mallocng_loc}
|
||||||
|
PRIVATE
|
||||||
|
malloc.c
|
||||||
|
calloc.c
|
||||||
|
free.c
|
||||||
|
realloc.c
|
||||||
|
aligned_alloc.c
|
||||||
|
posix_memalign.c
|
||||||
|
memalign.c
|
||||||
|
malloc_usable_size.c
|
||||||
|
meta.h
|
||||||
|
glue.h
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(external_mallocng
|
||||||
|
PRIVATE
|
||||||
|
${mallocng_loc}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_options(external_mallocng
|
||||||
|
PUBLIC
|
||||||
|
-fno-builtin-malloc
|
||||||
|
-fno-builtin-calloc
|
||||||
|
-fno-builtin-realloc
|
||||||
|
-fno-builtin-free
|
||||||
|
)
|
||||||
Loading…
Add table
Reference in a new issue