[iOS] Use memory footprint to dynamically adjust behavior of allocators
[WebKit-https.git] / Source / bmalloc / CMakeLists.txt
1 set_property(DIRECTORY . PROPERTY FOLDER "bmalloc")
2
3 set(bmalloc_INCLUDE_DIRECTORIES
4     "${BMALLOC_DIR}"
5 )
6
7 set(bmalloc_SOURCES
8     bmalloc/Allocator.cpp
9     bmalloc/AvailableMemory.cpp
10     bmalloc/Cache.cpp
11     bmalloc/Deallocator.cpp
12     bmalloc/DebugHeap.cpp
13     bmalloc/Environment.cpp
14     bmalloc/Heap.cpp
15     bmalloc/LargeMap.cpp
16     bmalloc/Logging.cpp
17     bmalloc/ObjectType.cpp
18     bmalloc/StaticMutex.cpp
19     bmalloc/VMHeap.cpp
20     bmalloc/mbmalloc.cpp
21 )
22
23 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
24     list(APPEND bmalloc_SOURCES
25         bmalloc/Zone.cpp
26     )
27 endif ()
28
29 set(bmalloc_LIBRARIES
30     ${CMAKE_DL_LIBS}
31 )
32
33 WEBKIT_WRAP_SOURCELIST(${bmalloc_SOURCES})
34 include_directories(${bmalloc_INCLUDE_DIRECTORIES})
35 add_library(bmalloc STATIC ${bmalloc_SOURCES})
36 target_link_libraries(bmalloc ${bmalloc_LIBRARIES})
37 set_target_properties(bmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_bmalloc")