mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 20:18:22 +00:00
[CMAKE]
- Add a flag to distinguish Ansi and Unicode message tables. Keep them Ansi for now pending further testing - Apply this to MSVC build as well. Fixes ntoskrnl messages incorrectly being Unicode svn path=/trunk/; revision=53971
This commit is contained in:
parent
5b1e7ef93c
commit
b4c79ff2b2
4 changed files with 19 additions and 10 deletions
|
@ -34,13 +34,18 @@ function(add_dependency_footer)
|
|||
file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml " </graph>\n</graphml>\n")
|
||||
endfunction()
|
||||
|
||||
function(add_message_headers)
|
||||
function(add_message_headers _type)
|
||||
if(${_type} STREQUAL UNICODE)
|
||||
set(_flag "-U")
|
||||
else()
|
||||
set(_flag "-A")
|
||||
endif()
|
||||
foreach(_in_FILE ${ARGN})
|
||||
get_filename_component(FILE ${_in_FILE} NAME_WE)
|
||||
macro_mc(${FILE})
|
||||
macro_mc(${_flag} ${FILE})
|
||||
add_custom_command(
|
||||
OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h
|
||||
COMMAND ${COMMAND_MC}
|
||||
COMMAND ${COMMAND_MC} ${MC_FLAGS}
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc)
|
||||
set_source_files_properties(
|
||||
${REACTOS_BINARY_DIR}/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/include/reactos/${FILE}.rc
|
||||
|
|
|
@ -249,8 +249,8 @@ function(spec2def _dllname _spec_file)
|
|||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c PROPERTIES GENERATED TRUE)
|
||||
endfunction()
|
||||
|
||||
macro(macro_mc FILE)
|
||||
set(COMMAND_MC ${CMAKE_MC_COMPILER} -A -b ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos)
|
||||
macro(macro_mc FLAG FILE)
|
||||
set(COMMAND_MC ${CMAKE_MC_COMPILER} ${FLAG} -b ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos)
|
||||
endmacro()
|
||||
|
||||
#pseh lib, needed with mingw
|
||||
|
|
|
@ -174,8 +174,8 @@ function(spec2def _dllname _spec_file)
|
|||
PROPERTIES GENERATED TRUE)
|
||||
endfunction()
|
||||
|
||||
macro(macro_mc FILE)
|
||||
set(COMMAND_MC mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc)
|
||||
macro(macro_mc FLAG FILE)
|
||||
set(COMMAND_MC mc ${FLAG} -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc)
|
||||
endmacro()
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/importlibs)
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
|
||||
list(APPEND SOURCE
|
||||
bugcodes.mc
|
||||
list(APPEND ANSI_SOURCE
|
||||
bugcodes.mc)
|
||||
|
||||
list(APPEND UNICODE_SOURCE
|
||||
errcodes.mc
|
||||
neteventmsg.mc
|
||||
ntstatus.mc
|
||||
pciclass.mc)
|
||||
|
||||
add_message_headers(${SOURCE})
|
||||
add_message_headers(ANSI ${ANSI_SOURCE})
|
||||
# FIXME: this needs testing before switching to unicode
|
||||
add_message_headers(ANSI ${UNICODE_SOURCE})
|
||||
|
|
Loading…
Reference in a new issue