1 2add_definitions( 3 -D_NTOSKRNL_ 4 -DNO_RTL_INLINES 5 -D_NTSYSTEM_ 6 -D_NTDLLBUILD_) 7 8if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") 9 # Enable this again. CORE-17637 10 add_compile_options(-Wunused-result) 11 12 add_compile_options(-Wno-incompatible-pointer-types) 13 add_compile_options(-Wno-missing-braces) 14endif() 15 16include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) 17 18list(APPEND RTL_WINE_SOURCE 19 actctx.c 20 timerqueue.c 21 threadpool.c 22) 23set_source_files_properties(threadpool.c PROPERTIES COMPILE_DEFINITIONS __WINESRC__) 24 25if(MSVC) 26 # Silence warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data 27 set_source_files_properties(${RTL_WINE_SOURCE} PROPERTIES COMPILE_OPTIONS "/wd4267") 28endif() 29 30list(APPEND SOURCE 31 ${RTL_WINE_SOURCE} 32 wine_debug.c 33 access.c 34 acl.c 35 appverifier.c 36 assert.c 37 atom.c 38 avltable.c 39 bitmap.c 40 bootdata.c 41 compress.c 42 crc32.c 43 critical.c 44 dbgbuffer.c 45 debug.c 46 dos8dot3.c 47 encode.c 48 env.c 49 error.c 50 exception.c 51 generictable.c 52 handle.c 53 heap.c 54 heapdbg.c 55 heappage.c 56 heapuser.c 57 image.c 58 interlck.c 59 largeint.c 60 luid.c 61 memstream.c 62 message.c 63 network.c 64 nls.c 65 path.c 66 ppb.c 67 prefix.c 68 priv.c 69 process.c 70 propvar.c 71 random.c 72 rangelist.c 73 registry.c 74 res.c 75 resource.c 76 rxact.c 77 sd.c 78 security.c 79 sid.c 80 slist.c 81 splaytree.c 82 sysvol.c 83 thread.c 84 time.c 85 timezone.c 86 trace.c 87 unicode.c 88 unicodeprefix.c 89 vectoreh.c 90 version.c 91 workitem.c 92 rtl.h) 93 94if(ARCH STREQUAL "i386") 95 list(APPEND ASM_SOURCE 96 i386/debug_asm.S 97 i386/except_asm.s 98 i386/interlck.S 99 i386/rtlmem.s 100 i386/rtlswap.S 101 i386/res_asm.s) 102 list(APPEND SOURCE 103 i386/except.c 104 i386/thread.c) 105elseif(ARCH STREQUAL "amd64") 106 list(APPEND ASM_SOURCE 107 amd64/debug_asm.S 108 amd64/except_asm.S 109 amd64/slist.S) 110 list(APPEND SOURCE 111 bitmap64.c 112 byteswap.c 113 amd64/dynfntbl.c 114 amd64/except.c 115 amd64/unwind.c 116 amd64/stubs.c 117 mem.c) 118elseif(ARCH STREQUAL "arm") 119 list(APPEND ASM_SOURCE arm/debug_asm.S) 120 list(APPEND SOURCE 121 arm/except.c 122 byteswap.c 123 mem.c) 124endif() 125 126add_asm_files(rtl_asm ${ASM_SOURCE}) 127add_library(rtl ${SOURCE} ${rtl_asm}) 128target_link_libraries(rtl PRIVATE pseh) 129add_pch(rtl rtl.h SOURCE) 130add_dependencies(rtl psdk asm) 131 132list(APPEND SOURCE_VISTA 133 condvar.c 134 runonce.c 135 srw.c 136 utf8.c) 137 138add_library(rtl_vista ${SOURCE_VISTA}) 139add_pch(rtl_vista rtl_vista.h SOURCE_VISTA) 140add_dependencies(rtl_vista psdk) 141target_link_libraries(rtl_vista PRIVATE pseh) 142