Author: dchapyshev
Date: Mon Aug 22 14:02:42 2016
New Revision: 72431
URL:
http://svn.reactos.org/svn/reactos?rev=72431&view=rev
Log:
[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)
Modified:
trunk/reactos/sdk/cmake/CMakeMacros.cmake
trunk/reactos/sdk/cmake/gcc.cmake
trunk/reactos/sdk/include/reactos/mc/CMakeLists.txt
Modified: trunk/reactos/sdk/cmake/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/CMakeMacros.cmak…
==============================================================================
--- trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] Mon Aug 22 14:02:42 2016
@@ -115,11 +115,17 @@
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)
Modified: trunk/reactos/sdk/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/gcc.cmake?rev=72…
==============================================================================
--- trunk/reactos/sdk/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/sdk/cmake/gcc.cmake [iso-8859-1] Mon Aug 22 14:02:42 2016
@@ -379,7 +379,7 @@
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
Modified: trunk/reactos/sdk/include/reactos/mc/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/mc/CMa…
==============================================================================
--- trunk/reactos/sdk/include/reactos/mc/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/reactos/mc/CMakeLists.txt [iso-8859-1] Mon Aug 22 14:02:42
2016
@@ -15,5 +15,5 @@
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})