Enable gigacage on iOS
[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/CryptoRandom.cpp
12     bmalloc/Deallocator.cpp
13     bmalloc/DebugHeap.cpp
14     bmalloc/Environment.cpp
15     bmalloc/Gigacage.cpp
16     bmalloc/Heap.cpp
17     bmalloc/HeapKind.cpp
18     bmalloc/LargeMap.cpp
19     bmalloc/Logging.cpp
20     bmalloc/ObjectType.cpp
21     bmalloc/Scavenger.cpp
22     bmalloc/StaticMutex.cpp
23     bmalloc/VMHeap.cpp
24     bmalloc/mbmalloc.cpp
25 )
26
27 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
28     list(APPEND bmalloc_SOURCES
29         bmalloc/Zone.cpp
30     )
31 endif ()
32
33 set(bmalloc_LIBRARIES
34     ${CMAKE_DL_LIBS}
35 )
36
37 WEBKIT_WRAP_SOURCELIST(${bmalloc_SOURCES})
38 include_directories(${bmalloc_INCLUDE_DIRECTORIES})
39 add_library(bmalloc STATIC ${bmalloc_SOURCES})
40 target_link_libraries(bmalloc ${bmalloc_LIBRARIES})
41 set_target_properties(bmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_bmalloc")
42
43 add_library(mbmalloc SHARED bmalloc/mbmalloc.cpp)
44 target_link_libraries(mbmalloc bmalloc ${CMAKE_THREAD_LIBS_INIT} ${bmalloc_LIBRARIES})
45 set_target_properties(mbmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_mbmalloc")