1
0
Fork 0
cmake_helpers/external/CMakeLists.txt
Klemens Nanni ddd1ee547d Introduce DESKTOP_APP_DISABLE_JEMALLOC to enable using system malloc
On at least OpenBSD, malloc(3) is preferred to other implementations
like jemalloc for various reasons.

It is common for portable third-party software (ports) to provide a
switch for en/disabling jemalloc.

tdesktop makes this easy since it does not contain any (je)malloc
specific code (anymore).

Introduce a new default-off option that disables jemalloc when enabled
explicitly;  this also allow developers and package maintainers more
easily to try different malloc implementations, e.g. for debugging.

Memory leaks reported in the slightly old issue
"The app consumes an unexpectedly large amount of RAM"
https://github.com/telegramdesktop/tdesktop/issues/16084 could not
be reproduced on OpenBSD/amd64 with malloc(3) using tdesktop >= 3.3.1.
2022-02-27 19:58:36 +03:00

68 lines
2.1 KiB
CMake

# 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
macro(add_checked_subdirectory name)
if (NOT DEFINED desktop_app_skip_libs
OR NOT ${name} IN_LIST desktop_app_skip_libs)
add_subdirectory(${name})
endif()
endmacro()
add_checked_subdirectory(angle)
add_checked_subdirectory(auto_updates)
add_checked_subdirectory(crash_reports)
if (LINUX)
add_checked_subdirectory(dispatch)
endif()
add_checked_subdirectory(expected)
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
add_checked_subdirectory(fcitx_qt5)
if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
add_checked_subdirectory(fcitx5_qt)
endif()
endif()
add_checked_subdirectory(ffmpeg)
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
add_checked_subdirectory(glib)
add_checked_subdirectory(glibmm)
endif()
add_checked_subdirectory(gsl)
if (LINUX AND NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
add_checked_subdirectory(hime_qt)
endif()
if (add_hunspell_library)
add_checked_subdirectory(hunspell)
endif()
add_checked_subdirectory(iconv)
if (LINUX AND NOT DESKTOP_APP_DISABLE_JEMALLOC)
add_checked_subdirectory(jemalloc)
endif()
add_checked_subdirectory(jpeg)
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
add_checked_subdirectory(kwayland)
endif()
add_checked_subdirectory(lz4)
add_checked_subdirectory(minizip)
if (LINUX)
add_checked_subdirectory(nimf_qt5)
endif()
add_checked_subdirectory(openal)
add_checked_subdirectory(openssl)
add_checked_subdirectory(opus)
add_checked_subdirectory(qt)
add_checked_subdirectory(qr_code_generator)
add_checked_subdirectory(ranges)
add_checked_subdirectory(rlottie)
add_checked_subdirectory(rnnoise)
add_checked_subdirectory(ton)
add_checked_subdirectory(variant)
add_checked_subdirectory(vpx)
add_checked_subdirectory(webrtc)
if (LINUX AND NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
add_checked_subdirectory(xcb)
endif()
add_checked_subdirectory(xxhash)
add_checked_subdirectory(zlib)