bmalloc: Use a separate zone when using system malloc
[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/Cache.cpp
10     bmalloc/Deallocator.cpp
11     bmalloc/DebugHeap.cpp
12     bmalloc/Environment.cpp
13     bmalloc/Heap.cpp
14     bmalloc/LargeMap.cpp
15     bmalloc/Logging.cpp
16     bmalloc/ObjectType.cpp
17     bmalloc/StaticMutex.cpp
18     bmalloc/VMHeap.cpp
19     bmalloc/mbmalloc.cpp
20 )
21
22 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
23     list(APPEND bmalloc_SOURCES
24         bmalloc/Zone.cpp
25     )
26 endif ()
27
28 set(bmalloc_LIBRARIES
29     ${CMAKE_DL_LIBS}
30 )
31
32 WEBKIT_WRAP_SOURCELIST(${bmalloc_SOURCES})
33 include_directories(${bmalloc_INCLUDE_DIRECTORIES})
34 add_library(bmalloc STATIC ${bmalloc_SOURCES})
35 target_link_libraries(bmalloc ${bmalloc_LIBRARIES})
36 set_target_properties(bmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_bmalloc")