I'm using Visual Studio 2019 combined with CMake to cross compile my project on both PC environment (generating .sln
file) and remote Linux machine (Generating Makefile
file). I'm switching between the environments using Visual Studio's Cross Compilation feature.
Is it somehow possible to run a Windows batch script on POST_BUILD
command even when I'm generating CMake on the Linux environment ?
I want this (or any other solution which will achieve the same) to work even when generating on Linux:
add_custom_command(
POST_BUILD
myTarget
COMMAND cmd /c H:/pathToMyCommand/myCommand.bat
)
(remember that I'm in Windows enviroment as Visual Studio is invoking CMake on the remote Linux machine)
I currently adding a custom command which run a shell
script directly from the Linux machine and connecting to the Windows environment, but I prefer to run a batch directly from Windows.
Is it possible?