CMAKE给VS程序添加管理员权限

  • Post author:
  • Post category:其他




关闭控制台窗口

SET(CMAKE_EXE_LINKER_FLAGS “



C

M

A

K

E

E

X

E

L

I

N

K

E

R

F

L

A

G

S

/

S

U

B

S

Y

S

T

E

M

:

W

I

N

D

O

W

S

)

S

E

T

(

C

M

A

K

E

E

X

E

L

I

N

K

E

R

F

L

A

G

S

{CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS”) SET(CMAKE_EXE_LINKER_FLAGS ”







C


M


A


K



E










E


















X



E










L


















I


N


K


E



R










F


















L


A


G


S



/


S


U


B


S


Y


S


T


E


M




:








W


I


N


D


O


W


S





)


S


E


T


(


C


M


A


K



E










E


















X



E










L


















I


N


K


E



R










F


















L


A


G


S








{CMAKE_EXE_LINKER_FLAGS} /ENTRY:“mainCRTStartup””)



添加管理员权限

SET(CMAKE_EXE_LINKER_FLAGS “${CMAKE_EXE_LINKER_FLAGS} /level=‘requireAdministrator’ /uiAccess=‘false’”)