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