(cmake): update Windows shell script template to require administrator privileges when needed
Description
- Update Windows shell script template to require administrator privileges when needed
Proposal
- Add a custom cmake property when an application target requires privilege escalation
- Update cmake/build/Windows/template_exe.bat.in to include a privilege escalation directive, e.g. right before the app launch:
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
Links / references
Edited by Alexandre ANCEL