Merge branch 'master' into blender2.8
[blender.git] / build_files / cmake / macros.cmake
index 417c012b526dc38c1dab212115452a79ffa26d7f..cf6a94303cf69d74cb390e1f40a5c42a096d5523 100644 (file)
@@ -1387,7 +1387,7 @@ endfunction()
 
 # macro for converting pixmap directory to a png and then a c file
 function(data_to_c_simple_icons
-       path_from
+       path_from icon_prefix icon_names
        list_to_add
        )
 
@@ -1405,8 +1405,11 @@ function(data_to_c_simple_icons
 
        get_filename_component(_file_to_path ${_file_to} PATH)
 
-       # ideally we wouldn't glob, but storing all names for all pixmaps is a bit heavy
-       file(GLOB _icon_files "${path_from}/*.dat")
+       # Construct a list of absolute paths from input
+       set(_icon_files)
+       foreach(_var ${icon_names})
+               list(APPEND _icon_files "${_path_from_abs}/${icon_prefix}${_var}.dat")
+       endforeach()
 
        add_custom_command(
                OUTPUT  ${_file_from} ${_file_to}