Changed: Allow to enable UAC for Windows client

This commit is contained in:
kervala 2014-12-26 13:44:03 +01:00
parent 25d1aa1d1f
commit a728ae6b36
2 changed files with 9 additions and 0 deletions

View file

@ -360,6 +360,7 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
###
OPTION(WITH_LUA51 "Build Ryzom Core using Lua 5.1" ON )
OPTION(WITH_LUA52 "Build Ryzom Core using Lua 5.2" OFF)
OPTION(WITH_RYZOM_CLIENT_UAC "Ask to run as Administrator" OFF)
ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS)

View file

@ -121,6 +121,14 @@ NL_ADD_RUNTIME_FLAGS(ryzom_client)
NL_ADD_LIB_SUFFIX(ryzom_client)
IF(WITH_RYZOM_CLIENT_UAC)
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/level='requireAdministrator'")
ELSEIF(CMAKE_GENERATOR MATCHES "NMake Makefiles")
SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio")
ENDIF(WITH_RYZOM_CLIENT_UAC)
IF(WITH_PCH AND (NOT MINGW OR NOT WITH_SYMBOLS))
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_client ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
ENDIF(WITH_PCH AND (NOT MINGW OR NOT WITH_SYMBOLS))