diff options
author | listout <listout@protonmail.com> | 2022-08-18 01:04:56 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-18 01:12:56 +0300 |
commit | f197b1a1f1bbc0334310fb1c911327246767a1a3 (patch) | |
tree | bf4b282fe4db30f6a66b532728ae2b69e03ca824 /source/blender/makesrna/intern | |
parent | 0a84cc691d7945624ff83256ba083d35f80c3191 (diff) |
CMake: support building with musl libc
Instead of using macros like GLIBC we can use the CMake build
systems internal functions to check if some header or functions are
present on the running system's libc.
Add ./build_files/cmake/have_features.cmake to add checks for
platform features which can be used to set defines for source
files that require them.
Reviewed By: campbellbarton
Ref D15696
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index b0fb86c8bc3..7e6e3bcf90e 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -6,6 +6,11 @@ if(CMAKE_COMPILER_IS_GNUCC) string(APPEND CMAKE_C_FLAGS " -Werror=implicit-function-declaration") endif() +# Needed for `mallocn.c`. +if(HAVE_MALLOC_STATS_H) + add_definitions(-DHAVE_MALLOC_STATS_H) +endif() + # files rna_access.c rna_define.c makesrna.c intentionally excluded. set(DEFSRC rna_ID.c |