소스 검색

[cpp] Use .mm extension for resource files if required

hughsando 9 년 전
부모
커밋
d4178e8bb0
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/generators/gencpp.ml

+ 2 - 1
src/generators/gencpp.ml

@@ -6162,9 +6162,10 @@ let write_build_data common_ctx filename classes main_deps boot_deps build_extra
    output_string buildfile "</files>\n";
    output_string buildfile "<files id=\"__resources__\">\n";
    let idx = ref 0 in
+   let ext = source_file_extension common_ctx in
    Hashtbl.iter (fun _ data ->
       let id = "__res_" ^ (string_of_int !idx) in
-      output_string buildfile ("<file name=\"src/resources/" ^ id ^ ".cpp\" tags=\"optim-none\" />\n");
+      output_string buildfile ("<file name=\"src/resources/" ^ id ^ ext ^ "\" tags=\"optim-none\" />\n");
       incr idx;
    ) common_ctx.resources;
    output_string buildfile "</files>\n";