Unreviewed, rolling out r233547 and r233550.
[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/AllIsoHeaps.cpp
9     bmalloc/Allocator.cpp
10     bmalloc/AvailableMemory.cpp
11     bmalloc/Cache.cpp
12     bmalloc/CryptoRandom.cpp
13     bmalloc/Deallocator.cpp
14     bmalloc/DebugHeap.cpp
15     bmalloc/Environment.cpp
16     bmalloc/FreeList.cpp
17     bmalloc/Gigacage.cpp
18     bmalloc/Heap.cpp
19     bmalloc/HeapKind.cpp
20     bmalloc/IsoHeapImpl.cpp
21     bmalloc/IsoPage.cpp
22     bmalloc/IsoTLS.cpp
23     bmalloc/IsoTLSEntry.cpp
24     bmalloc/IsoTLSLayout.cpp
25     bmalloc/LargeMap.cpp
26     bmalloc/Logging.cpp
27     bmalloc/Mutex.cpp
28     bmalloc/ObjectType.cpp
29     bmalloc/PerProcess.cpp
30     bmalloc/Scavenger.cpp
31     bmalloc/VMHeap.cpp
32     bmalloc/bmalloc.cpp
33     bmalloc/mbmalloc.cpp
34 )
35
36 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
37     list(APPEND bmalloc_SOURCES
38         bmalloc/Zone.cpp
39     )
40 endif ()
41
42 set(bmalloc_LIBRARIES
43     ${CMAKE_DL_LIBS}
44 )
45
46 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
47
48 WEBKIT_WRAP_SOURCELIST(${bmalloc_SOURCES})
49 include_directories(${bmalloc_INCLUDE_DIRECTORIES})
50 add_library(bmalloc STATIC ${bmalloc_SOURCES})
51 target_link_libraries(bmalloc ${bmalloc_LIBRARIES})
52 set_target_properties(bmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_bmalloc")
53
54 if (DEVELOPER_MODE)
55     add_library(mbmalloc SHARED bmalloc/mbmalloc.cpp)
56     target_link_libraries(mbmalloc bmalloc ${CMAKE_THREAD_LIBS_INIT} ${bmalloc_LIBRARIES})
57     set_target_properties(mbmalloc PROPERTIES COMPILE_DEFINITIONS "BUILDING_mbmalloc")
58 endif ()