I tried using the VS_DEBUGGER_COMMAND
property with generator expressions.
According to the CMake manual it should work: https://cmake.org/cmake/help/v3.16/prop_tgt/VS_DEBUGGER_COMMAND.html
My CMake script is the following:
set_property(TARGET ${MAYA_PLUGIN_NAME} PROPERTY VS_DEBUGGER_COMMAND
$<$<CONFIG:Debug2017>:"C:/Program Files/Autodesk/Maya2017/bin/maya.exe">
$<$<CONFIG:Release2017>:"C:/Program Files/Autodesk/Maya2017/bin/maya.exe">
$<$<CONFIG:Debug2018>:"C:/Program Files/Autodesk/Maya2018/bin/maya.exe">
$<$<CONFIG:Release2018>:"C:/Program Files/Autodesk/Maya2018/bin/maya.exe">
$<$<CONFIG:Debug2019>:"C:/Program Files/Autodesk/Maya2019/bin/maya.exe">
$<$<CONFIG:Release2019>:"C:/Program Files/Autodesk/Maya2019/bin/maya.exe">
)
What I got for the Debug2018
configuration for the Debugger command is:
Command ;;"C:/Program Files/Autodesk/Maya2018/bin/maya.exe";;;
which is not correct of course.
Question: What am I doing wrong?