[THEMES] Overhaul ReactOS modern theme. CORE-13020 (#1424)
[reactos.git] / media / themes / modern.msstyles / CMakeLists.txt
1 file(GLOB_RECURSE rc_msstyles_bitmaps ${CMAKE_CURRENT_BINARY_DIR}/bitmaps/*)
2 add_rc_deps(rapps.rc ${rc_msstyles_bitmaps})
3
4 file(GLOB_RECURSE rc_msstyles_lang ${CMAKE_CURRENT_BINARY_DIR}/lang/*)
5 add_rc_deps(rapps.rc ${rc_msstyles_lang})
6
7 file(GLOB_RECURSE rc_msstyles_textfiles ${CMAKE_CURRENT_BINARY_DIR}/textfiles/*)
8 add_rc_deps(rapps.rc ${rc_msstyles_textfiles})
9
10 list(APPEND TEXTFILES
11 textfiles/Light/ExtraLargeLight.INI
12 textfiles/Light/LargeFontsLight.INI
13 textfiles/Light/RegularLight.INI
14 textfiles/Dark/ExtraLargeDark.INI
15 textfiles/Dark/LargeFontsDark.INI
16 textfiles/Dark/RegularDark.INI)
17
18 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/textfiles)
19 foreach(_file ${TEXTFILES})
20 get_filename_component(_file_name ${_file} NAME_WE)
21 string(REPLACE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} _converted_file "${_file}")
22 string(REPLACE ${_file_name} "${_file_name}_utf16" _converted_file ${_converted_file})
23 set(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
24 set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_converted_file})
25 add_custom_command(OUTPUT ${_converted_file}
26 COMMAND native-utf16le ${_file} ${_converted_file}
27 DEPENDS native-utf16le ${_file})
28 list(APPEND _converted_files ${_converted_file})
29 endforeach()
30
31 set_source_files_properties(modern.rc PROPERTIES OBJECT_DEPENDS "${_converted_files}")
32 add_library(modern.msstyles MODULE modern.rc)
33 set_module_type(modern.msstyles module)
34 set_target_properties(modern.msstyles PROPERTIES SUFFIX "")
35 add_cd_file(TARGET modern.msstyles DESTINATION reactos/Resources/Themes/Modern FOR all)