mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[CMAKE] Fix generation of UTF-16 inf file
This commit is contained in:
@@ -7,13 +7,12 @@ list(APPEND TEXTFILES
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
||||
foreach(_file ${TEXTFILES})
|
||||
get_filename_component(_file_name ${_file} NAME_WE)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
||||
set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
|
||||
get_filename_component(_subdir ${_file} DIRECTORY)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_subdir})
|
||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_subdir}/${_file_name}_utf16.INI)
|
||||
add_custom_command(OUTPUT ${_converted_file}
|
||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
||||
DEPENDS native-utf16le ${_file})
|
||||
COMMAND native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${_converted_file}
|
||||
DEPENDS native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||
list(APPEND _converted_files ${_converted_file})
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -7,13 +7,12 @@ list(APPEND TEXTFILES
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
||||
foreach(_file ${TEXTFILES})
|
||||
get_filename_component(_file_name ${_file} NAME_WE)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
||||
set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
|
||||
get_filename_component(_subdir ${_file} DIRECTORY)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_subdir})
|
||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_subdir}/${_file_name}_utf16.INI)
|
||||
add_custom_command(OUTPUT ${_converted_file}
|
||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
||||
DEPENDS native-utf16le ${_file})
|
||||
COMMAND native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${_converted_file}
|
||||
DEPENDS native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||
list(APPEND _converted_files ${_converted_file})
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -7,13 +7,12 @@ list(APPEND TEXTFILES
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
||||
foreach(_file ${TEXTFILES})
|
||||
get_filename_component(_file_name ${_file} NAME_WE)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
||||
set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
|
||||
get_filename_component(_subdir ${_file} DIRECTORY)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_subdir})
|
||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_subdir}/${_file_name}_utf16.INI)
|
||||
add_custom_command(OUTPUT ${_converted_file}
|
||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
||||
DEPENDS native-utf16le ${_file})
|
||||
COMMAND native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${_converted_file}
|
||||
DEPENDS native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||
list(APPEND _converted_files ${_converted_file})
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -12,13 +12,12 @@ list(APPEND TEXTFILES
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
|
||||
foreach(_file ${TEXTFILES})
|
||||
get_filename_component(_file_name ${_file} NAME_WE)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
||||
set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
|
||||
get_filename_component(_subdir ${_file} DIRECTORY)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_subdir})
|
||||
set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_subdir}/${_file_name}_utf16.INI)
|
||||
add_custom_command(OUTPUT ${_converted_file}
|
||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
||||
DEPENDS native-utf16le ${_file})
|
||||
COMMAND native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${_converted_file}
|
||||
DEPENDS native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
|
||||
list(APPEND _converted_files ${_converted_file})
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -821,8 +821,9 @@ function(create_registry_hives)
|
||||
# Convert files to utf16le
|
||||
foreach(_file ${_inf_files})
|
||||
get_filename_component(_file_name ${_file} NAME_WE)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
|
||||
string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
|
||||
file(RELATIVE_PATH _subdir ${CMAKE_SOURCE_DIR} ${_file})
|
||||
get_filename_component(_subdir ${_subdir} DIRECTORY)
|
||||
set(_converted_file ${CMAKE_BINARY_DIR}/${_subdir}/${_file_name}_utf16.inf)
|
||||
add_custom_command(OUTPUT ${_converted_file}
|
||||
COMMAND native-utf16le ${_file} ${_converted_file}
|
||||
DEPENDS native-utf16le ${_file})
|
||||
|
||||
Reference in New Issue
Block a user