1 2list(APPEND _keyboard_layouts 3 kbda1 4 kbda2 5 kbda3 6 kbdal 7 kbdarme 8 kbdarmw 9 kbdaze 10 kbdazel 11 kbdbe 12 kbdbga 13 kbdbgt 14 kbdblr 15 kbdbr 16 kbdbu 17 kbdbur 18 kbdcan 19 kbdcr 20 kbdcz 21 kbdcz1 22 kbdda 23 kbddv 24 kbdeo 25 kbdest 26 kbdfc 27 kbdfi 28 kbdfr 29 kbdgeo 30 kbdgerg 31 kbdgneo 32 kbdgr 33 kbdgr1 34 kbdhe 35 kbdheb 36 kbdhu 37 kbdic 38 kbdinasa 39 kbdinben 40 kbdindev 41 kbdinguj 42 kbdinmal 43 kbdir 44 kbdit 45 kbdjpn 46 kbdkaz 47 kbdkor 48 kbdla 49 kbdlt1 50 kbdlv 51 kbdmac 52 kbdne 53 kbdno 54 kbdpl 55 kbdpl1 56 kbdpo 57 kbdro 58 kbdrost 59 kbdru 60 kbdru1 61 kbdsf 62 kbdsg 63 kbdsl 64 kbdsl1 65 kbdsp 66 kbdsw 67 kbdtat 68 kbdth0 69 kbdth1 70 kbdth2 71 kbdth3 72 kbdtuf 73 kbdtuq 74 kbduk 75 kbdur 76 kbdurs 77 kbdus 78 kbdusa 79 kbdusl 80 kbdusr 81 kbdusx 82 kbduzb 83 kbdvntc 84 kbdycc 85 kbdycl) 86 87foreach(_keyboard_layout ${_keyboard_layouts}) 88 spec2def(${_keyboard_layout}.dll ${_keyboard_layout}/${_keyboard_layout}.spec) 89 90 add_library(${_keyboard_layout} MODULE 91 ${_keyboard_layout}/${_keyboard_layout}.c 92 ${_keyboard_layout}/${_keyboard_layout}.rc 93 ${CMAKE_CURRENT_BINARY_DIR}/${_keyboard_layout}.def) 94 95 target_include_directories(${_keyboard_layout} PRIVATE ${REACTOS_SOURCE_DIR}/ntoskrnl/include) 96 set_entrypoint(${_keyboard_layout} 0) 97 set_image_base(${_keyboard_layout} 0x5FFF0000) 98 set_subsystem(${_keyboard_layout} native) 99 100 if(MSVC) 101 # Merge the .text and .rdata section into the .data section 102 target_link_options(${_keyboard_layout} PRIVATE "/ignore:4254;/SECTION:.data,ER;/MERGE:.text=.data;/MERGE:.rdata=.data;/MERGE:.bss=.data;/MERGE:.edata=.data") 103 else() 104 # Use a custom linker script 105 target_link_options(${_keyboard_layout} PRIVATE "-Wl,-T,${CMAKE_CURRENT_SOURCE_DIR}/kbdlayout.lds") 106 endif() 107 108 # dynamic analysis switches 109 if(STACK_PROTECTOR) 110 target_compile_options(${_keyboard_layout} PRIVATE -fno-stack-protector) 111 endif() 112 113 if(RUNTIME_CHECKS) 114 target_link_libraries(${_keyboard_layout} runtmchk) 115 endif() 116 117 add_dependencies(${_keyboard_layout} psdk) 118 add_cd_file(TARGET ${_keyboard_layout} DESTINATION reactos/system32 FOR all) 119endforeach() 120