a7fbebb13bdd7da781ca9d0e987e82e88b932638
[reactos.git] / media / themes / modern.msstyles / CMakeLists.txt
1
2 list(APPEND TEXTFILES
3 textfiles/ExtraLargeLight.INI
4 textfiles/LargeFontsLight.INI
5 textfiles/RegularLight.INI
6 textfiles/ExtraLargeDark.INI
7 textfiles/LargeFontsDark.INI
8 textfiles/RegularDark.INI)
9
10 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
11 foreach(_file ${TEXTFILES})
12 get_filename_component(_file_name ${_file} NAME_WE)
13 string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
14 string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
15 set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
16 set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
17 add_custom_command(OUTPUT ${_converted_file}
18 COMMAND native-utf16le ${_file} ${_converted_file}
19 DEPENDS native-utf16le ${_file})
20 list(APPEND _converted_files ${_converted_file})
21 endforeach()
22
23 set_source_files_properties(modern.rc PROPERTIES OBJECT_DEPENDS "${_converted_files}")
24 add_library(modern.msstyles MODULE modern.rc)
25 set_module_type(modern.msstyles module)
26 set_target_properties(modern.msstyles PROPERTIES SUFFIX "")
27 add_cd_file(TARGET modern.msstyles DESTINATION reactos/Resources/Themes/Modern FOR all)