From b4f0ea4c78c6dff81fbba1005d1f9fc20a296dfd Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Tue, 3 May 2016 00:08:32 -0400 Subject: [PATCH] More merge? More merge. --- indra/cmake/NVAPI.cmake | 2 -- indra/cmake/Variables.cmake | 3 +++ indra/newview/CMakeLists.txt | 7 +++++++ indra/newview/llappviewerwin32.cpp | 14 -------------- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake index d60e42c87..080d8fcf7 100644 --- a/indra/cmake/NVAPI.cmake +++ b/indra/cmake/NVAPI.cmake @@ -2,8 +2,6 @@ include(Prebuilt) include(Variables) -set(NVAPI ON CACHE BOOL "Use NVAPI.") - if (NVAPI) if (WINDOWS) use_prebuilt_binary(nvapi) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 28082a3a5..8c4ca493e 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -32,6 +32,9 @@ set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal wa option(INCREMENTAL_LINK "Use incremental linking or incremental LTCG for LTO on win32 builds (enable for faster links on some machines)" OFF) option(USE_LTO "Enable Whole Program Optimization and related folding and binary reduction routines" OFF) +# Proprietary Library Features +option(NVAPI "Use nvapi driver interface library" OFF) + if(LIBS_CLOSED_DIR) file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR) else(LIBS_CLOSED_DIR) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a1dd9bdc8..f33801811 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1212,6 +1212,13 @@ if (WINDOWS) llwindebug.h ) + if (NVAPI) + set(APPVWRW32_COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS} -DUSE_NVAPI=1") + else (NVAPI) + set(APPVWRW32_COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS} -UUSE_NVAPI") + endif (NVAPI) + set_source_files_properties(llappviewerwin32.cpp PROPERTIES COMPILE_FLAGS "${APPVWRW32_COMPILE_FLAGS}") + # precompiled header configuration # llviewerprecompiledheaders.cpp generates # the .pch file. diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 205414a90..49947e96b 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -87,20 +87,6 @@ extern "C" { const std::string LLAppViewerWin32::sWindowClass = "Second Life"; -/* - This function is used to print to the command line a text message - describing the nvapi error and quits -*/ -void nvapi_error(NvAPI_Status status) -{ - NvAPI_ShortString szDesc = {0}; - NvAPI_GetErrorMessage(status, szDesc); - LL_WARNS() << szDesc << LL_ENDL; - - //should always trigger when asserts are enabled - //llassert(status == NVAPI_OK); -} - // Create app mutex creates a unique global windows object. // If the object can be created it returns true, otherwise // it returns false. The false result can be used to determine