mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[CMAKE]
- Convert all *.mc files to UTF16 LE (without BOM) at build - Use unicode flag in windmc/mc for source files - Switch UNICODE_SOURCE files to UNICODE (must check for the presence of regression tests) svn path=/trunk/; revision=72431
This commit is contained in:
parent
bdc447f6cd
commit
bac50c092f
3 changed files with 9 additions and 3 deletions
|
@ -115,11 +115,17 @@ function(add_message_headers _type)
|
|||
endif()
|
||||
foreach(_in_FILE ${ARGN})
|
||||
get_filename_component(FILE ${_in_FILE} NAME_WE)
|
||||
set(_converted_item ${REACTOS_BINARY_DIR}/sdk/include/reactos/mc/${FILE}.mc)
|
||||
set(_source_item ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc)
|
||||
add_custom_command(
|
||||
OUTPUT "${_converted_item}"
|
||||
COMMAND native-utf16le "${_source_item}" "${_converted_item}" "nobom"
|
||||
DEPENDS native-utf16le "${_source_item}")
|
||||
macro_mc(${_flag} ${FILE})
|
||||
add_custom_command(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.rc ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.h
|
||||
COMMAND ${COMMAND_MC} ${MC_FLAGS}
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc)
|
||||
DEPENDS "${_converted_item}")
|
||||
set_source_files_properties(
|
||||
${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.rc
|
||||
PROPERTIES GENERATED TRUE)
|
||||
|
|
|
@ -379,7 +379,7 @@ function(spec2def _dllname _spec_file)
|
|||
endfunction()
|
||||
|
||||
macro(macro_mc FLAG FILE)
|
||||
set(COMMAND_MC ${CMAKE_MC_COMPILER} ${FLAG} -b ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc -r ${REACTOS_BINARY_DIR}/sdk/include/reactos -h ${REACTOS_BINARY_DIR}/sdk/include/reactos)
|
||||
set(COMMAND_MC ${CMAKE_MC_COMPILER} -u ${FLAG} -b ${REACTOS_BINARY_DIR}/sdk/include/reactos/mc/${FILE}.mc -r ${REACTOS_BINARY_DIR}/sdk/include/reactos -h ${REACTOS_BINARY_DIR}/sdk/include/reactos)
|
||||
endmacro()
|
||||
|
||||
# PSEH lib, needed with mingw
|
||||
|
|
|
@ -15,5 +15,5 @@ list(APPEND UNICODE_SOURCE_REALLY
|
|||
|
||||
add_message_headers(ANSI ${ANSI_SOURCE})
|
||||
# FIXME: this needs testing before switching to unicode
|
||||
add_message_headers(ANSI ${UNICODE_SOURCE})
|
||||
add_message_headers(UNICODE ${UNICODE_SOURCE})
|
||||
add_message_headers(UNICODE ${UNICODE_SOURCE_REALLY})
|
||||
|
|
Loading…
Reference in a new issue