views:

170

answers:

1

Hello :)

I'm trying to set the RequireAdministrator manifest flag on an executable I'm building with CMake and Visual Studio.

Any ideas on how to direct CMake to set that option?

Thanks!

Billy3

+2  A: 

try this:

SET_TARGET_PROPERTIES(your_executable PROPERTIES LINK_FLAGS    "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\" /SUBSYSTEM:WINDOWS")
Nadir SOUALEM
Works so long as remove /SUBSYSTEM:Windows ... it's a console app :)
Billy ONeal
Note that these manifest settings don't seem to show up in the project properties, but they do appear in the intermediate manifest. And they are recorded in the .vcproj file. (This is with VS2008).
Jason Harrison