1 set(WTF_LIBRARY_TYPE STATIC) 2 3 list(APPEND WTF_INCLUDE_DIRECTORIES 4 "${WTF_DIR}/wtf/java" 5 "${CMAKE_SOURCE_DIR}/Source" 6 "${JAVA_INCLUDE_PATH}" 7 "${JAVA_INCLUDE_PATH2}" 8 ) 9 10 list(APPEND WTF_HEADERS 11 java/JavaEnv.h 12 java/JavaRef.h 13 java/DbgUtils.h 14 unicode/java/UnicodeJava.h 15 ) 16 17 list(APPEND WTF_SOURCES 18 java/StringJava.cpp 19 java/MainThreadJava.cpp 20 java/JavaEnv.cpp 21 java/TextBreakIteratorInternalICUJava.cpp 22 ) 23 24 list(APPEND WTF_LIBRARIES 25 "${JAVA_JVM_LIBRARY}" 26 ) 27 28 list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES 29 "${JDK_INCLUDE_DIRS}" 30 ) 31 32 if (APPLE) 33 file(COPY mac/MachExceptions.defs DESTINATION ${DERIVED_SOURCES_WTF_DIR}) 34 35 add_custom_command( 36 OUTPUT 37 ${DERIVED_SOURCES_WTF_DIR}/MachExceptionsServer.h 38 ${DERIVED_SOURCES_WTF_DIR}/mach_exc.h 39 ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c 40 ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c 41 MAIN_DEPENDENCY mac/MachExceptions.defs 42 WORKING_DIRECTORY ${DERIVED_SOURCES_WTF_DIR} 43 COMMAND mig -sheader MachExceptionsServer.h MachExceptions.defs 44 VERBATIM) 45 46 list(APPEND WTF_SOURCES 47 ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c 48 ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c 49 ) 50 51 list(APPEND WTF_HEADERS 52 cf/TypeCastsCF.h 53 ) 54 55 list(APPEND WTF_PRIVATE_INCLUDE_DIRECTORIES 56 # Check whether we can use WTF/icu 57 # "${WTF_DIR}/icu" 58 ${DERIVED_SOURCES_WTF_DIR} 59 ) 60 61 list(APPEND WTF_SOURCES 62 cf/RunLoopCF.cpp 63 cf/LanguageCF.cpp 64 cocoa/CPUTimeCocoa.mm 65 cocoa/MemoryFootprintCocoa.cpp 66 cocoa/MemoryPressureHandlerCocoa.mm 67 cocoa/WorkQueueCocoa.cpp 68 text/cf/StringImplCF.cpp 69 text/cf/StringCF.cpp 70 text/mac/StringMac.mm 71 text/mac/StringImplMac.mm 72 BlockObjCExceptions.mm 73 ) 74 75 find_library(COCOA_LIBRARY Cocoa) 76 find_library(COREFOUNDATION_LIBRARY CoreFoundation) 77 list(APPEND WTF_LIBRARIES 78 ${COREFOUNDATION_LIBRARY} 79 ${COCOA_LIBRARY} 80 ) 81 elseif (UNIX) 82 list(APPEND WTF_SOURCES 83 generic/RunLoopGeneric.cpp 84 generic/WorkQueueGeneric.cpp 85 linux/CurrentProcessMemoryStatus.cpp 86 linux/MemoryFootprintLinux.cpp 87 linux/MemoryPressureHandlerLinux.cpp 88 unix/CPUTimeUnix.cpp 89 unix/LanguageUnix.cpp 90 ) 91 list(APPEND WTF_LIBRARIES rt) 92 elseif (WIN32) 93 list(APPEND WTF_SOURCES 94 win/CPUTimeWin.cpp 95 win/LanguageWin.cpp 96 win/MemoryFootprintWin.cpp 97 win/MemoryPressureHandlerWin.cpp 98 win/RunLoopWin.cpp 99 win/WorkQueueWin.cpp 100 win/WorkItemContext.cpp 101 ) 102 103 list(APPEND WTF_HEADERS 104 text/win/WCharStringExtras.h 105 win/Win32Handle.h 106 ) 107 108 list(APPEND WTF_LIBRARIES 109 winmm 110 ) 111 endif () 112 113 if (DEFINED CMAKE_USE_PTHREADS_INIT) 114 list(APPEND WTF_LIBRARIES pthread) 115 endif() 116 117 add_dependencies(WTF icudatagen)