mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[CMAKE] Fix generation of UTF-16 inf file
This commit is contained in:
parent
4c5351bf55
commit
d0ed4fdb3a
|
@ -7,13 +7,12 @@ list(APPEND TEXTFILES
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
||||||
foreach(_file ${TEXTFILES})
|
foreach(_file ${TEXTFILES})
|
||||||
get_filename_component(_file_name ${_file} NAME_WE)
|
get_filename_component(_file_name ${_file} NAME_WE)
|
||||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
get_filename_component(_subdir ${_file} DIRECTORY)
|
||||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_subdir})
|
||||||
set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_subdir}/${_file_name}_utf16.INI)
|
||||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
|
|
||||||
add_custom_command(OUTPUT ${_converted_file}
|
add_custom_command(OUTPUT ${_converted_file}
|
||||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
COMMAND native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${_converted_file}
|
||||||
DEPENDS native-utf16le ${_file})
|
DEPENDS native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||||
list(APPEND _converted_files ${_converted_file})
|
list(APPEND _converted_files ${_converted_file})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,12 @@ list(APPEND TEXTFILES
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
||||||
foreach(_file ${TEXTFILES})
|
foreach(_file ${TEXTFILES})
|
||||||
get_filename_component(_file_name ${_file} NAME_WE)
|
get_filename_component(_file_name ${_file} NAME_WE)
|
||||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
get_filename_component(_subdir ${_file} DIRECTORY)
|
||||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_subdir})
|
||||||
set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_subdir}/${_file_name}_utf16.INI)
|
||||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
|
|
||||||
add_custom_command(OUTPUT ${_converted_file}
|
add_custom_command(OUTPUT ${_converted_file}
|
||||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
COMMAND native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${_converted_file}
|
||||||
DEPENDS native-utf16le ${_file})
|
DEPENDS native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||||
list(APPEND _converted_files ${_converted_file})
|
list(APPEND _converted_files ${_converted_file})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,12 @@ list(APPEND TEXTFILES
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
||||||
foreach(_file ${TEXTFILES})
|
foreach(_file ${TEXTFILES})
|
||||||
get_filename_component(_file_name ${_file} NAME_WE)
|
get_filename_component(_file_name ${_file} NAME_WE)
|
||||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
get_filename_component(_subdir ${_file} DIRECTORY)
|
||||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_subdir})
|
||||||
set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_subdir}/${_file_name}_utf16.INI)
|
||||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
|
|
||||||
add_custom_command(OUTPUT ${_converted_file}
|
add_custom_command(OUTPUT ${_converted_file}
|
||||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
COMMAND native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${_converted_file}
|
||||||
DEPENDS native-utf16le ${_file})
|
DEPENDS native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||||
list(APPEND _converted_files ${_converted_file})
|
list(APPEND _converted_files ${_converted_file})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
|
@ -12,13 +12,12 @@ list(APPEND TEXTFILES
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
||||||
foreach(_file ${TEXTFILES})
|
foreach(_file ${TEXTFILES})
|
||||||
get_filename_component(_file_name ${_file} NAME_WE)
|
get_filename_component(_file_name ${_file} NAME_WE)
|
||||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
get_filename_component(_subdir ${_file} DIRECTORY)
|
||||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_subdir})
|
||||||
set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_subdir}/${_file_name}_utf16.INI)
|
||||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
|
|
||||||
add_custom_command(OUTPUT ${_converted_file}
|
add_custom_command(OUTPUT ${_converted_file}
|
||||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
COMMAND native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${_converted_file}
|
||||||
DEPENDS native-utf16le ${_file})
|
DEPENDS native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||||
list(APPEND _converted_files ${_converted_file})
|
list(APPEND _converted_files ${_converted_file})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
|
@ -821,8 +821,9 @@ function(create_registry_hives)
|
||||||
# Convert files to utf16le
|
# Convert files to utf16le
|
||||||
foreach(_file ${_inf_files})
|
foreach(_file ${_inf_files})
|
||||||
get_filename_component(_file_name ${_file} NAME_WE)
|
get_filename_component(_file_name ${_file} NAME_WE)
|
||||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
file(RELATIVE_PATH _subdir ${CMAKE_SOURCE_DIR} ${_file})
|
||||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
get_filename_component(_subdir ${_subdir} DIRECTORY)
|
||||||
|
set(_converted_file ${CMAKE_BINARY_DIR}/${_subdir}/${_file_name}_utf16.inf)
|
||||||
add_custom_command(OUTPUT ${_converted_file}
|
add_custom_command(OUTPUT ${_converted_file}
|
||||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
COMMAND native-utf16le ${_file} ${_converted_file}
|
||||||
DEPENDS native-utf16le ${_file})
|
DEPENDS native-utf16le ${_file})
|
||||||
|
|
Loading…
Reference in a new issue