Created
February 21, 2023 00:35
-
-
Save k0mp1ex/5cf6081a6829813177d1a6dbbdf54799 to your computer and use it in GitHub Desktop.
Build executable with CMake that requires administrator access to run it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.24) | |
project(INeedAdmin VERSION 1.0.0) | |
set(CMAKE_CXX_STANDARD 23) | |
add_executable(${PROJECT_NAME} main.cpp) | |
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS " /MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\" ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment