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 kbdbgm 14 kbdbgt 15 kbdblr 16 kbdbr 17 kbdbur 18 kbdcan 19 kbdcr 20 kbdcz 21 kbdcz1 22 kbdda 23 kbddv 24 kbdeo 25 kbdes 26 kbdest 27 kbdfc 28 kbdfi 29 kbdfr 30 kbdgeo 31 kbdgerg 32 kbdgneo 33 kbdgr 34 kbdgrist 35 kbdhe 36 kbdheb 37 kbdhu 38 kbdic 39 kbdinasa 40 kbdinben 41 kbdindev 42 kbdinguj 43 kbdinmal 44 kbdir 45 kbdit 46 kbdja 47 kbdkaz 48 kbdko 49 kbdla 50 kbdlt1 51 kbdlv 52 kbdmac 53 kbdne 54 kbdno 55 kbdpl 56 kbdpl1 57 kbdpo 58 kbdro 59 kbdrost 60 kbdru 61 kbdru1 62 kbdsf 63 kbdsg 64 kbdsk 65 kbdsk1 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 add_target_link_flags(${_keyboard_layout} "/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 add_target_link_flags(${_keyboard_layout} "-Wl,-T,${CMAKE_CURRENT_SOURCE_DIR}/kbdlayout.lds") 106 107 # Avoid "universal character names are only valid in C++ and C99" error. 108 set_property(TARGET ${_keyboard_layout} PROPERTY C_STANDARD 99) 109 endif() 110 111 # dynamic analysis switches 112 if(STACK_PROTECTOR) 113 target_compile_options(${_keyboard_layout} PRIVATE -fno-stack-protector) 114 endif() 115 116 if(RUNTIME_CHECKS) 117 target_link_libraries(${_keyboard_layout} runtmchk) 118 endif() 119 120 add_dependencies(${_keyboard_layout} psdk) 121 add_cd_file(TARGET ${_keyboard_layout} DESTINATION reactos/system32 FOR all) 122endforeach() 123