@@ -323,26 +323,37 @@ endmacro()
323323macro (append_compiler_executables_configuration )
324324 set (_conan_c_compiler "" )
325325 set (_conan_cpp_compiler "" )
326+ set (_conan_rc_compiler "" )
327+ set (_conan_compilers_list "" )
326328 if (CMAKE_C_COMPILER )
327- set (_conan_c_compiler "\" c\" :\" ${CMAKE_C_COMPILER } \" , " )
329+ set (_conan_c_compiler "\" c\" :\" ${CMAKE_C_COMPILER } \" " )
328330 set_conan_compiler_if_appleclang (C cc _conan_c_compiler )
331+ list (APPEND _conan_compilers_list ${_conan_c_compiler} )
329332 else ()
330333 message (WARNING "CMake-Conan: The C compiler is not defined. "
331334 "Please define CMAKE_C_COMPILER or enable the C language." )
332335 endif ()
333336 if (CMAKE_CXX_COMPILER )
334337 set (_conan_cpp_compiler "\" cpp\" :\" ${CMAKE_CXX_COMPILER } \" " )
335338 set_conan_compiler_if_appleclang (CXX c++ _conan_cpp_compiler )
339+ list (APPEND _conan_compilers_list ${_conan_cpp_compiler} )
336340 else ()
337341 message (WARNING "CMake-Conan: The C++ compiler is not defined. "
338342 "Please define CMAKE_CXX_COMPILER or enable the C++ language." )
339343 endif ()
340-
341- if (NOT "x${_conan_c_compiler}${_conan_cpp_compiler} " STREQUAL "x" )
342- string (APPEND PROFILE "tools.build:compiler_executables={${_conan_c_compiler}${_conan_cpp_compiler} }\n " )
344+ if (CMAKE_RC_COMPILER)
345+ set (_conan_rc_compiler "\" rc\" :\" ${CMAKE_RC_COMPILER} \" " )
346+ list (APPEND _conan_compilers_list ${_conan_rc_compiler} )
347+ # Not necessary to warn if RC not defined
348+ endif ()
349+ if (NOT "x${_conan_compilers_list} " STREQUAL "x" )
350+ string (REPLACE ";" "," _conan_compilers_list "${_conan_compilers_list} " )
351+ string (APPEND PROFILE "tools.build:compiler_executables={${_conan_compilers_list} }\n " )
343352 endif ()
344353 unset (_conan_c_compiler)
345354 unset (_conan_cpp_compiler)
355+ unset (_conan_rc_compiler)
356+ unset (_conan_compilers_list)
346357endmacro ()
347358
348359
0 commit comments