Merge pull request #6265 from ZappoMan/fixWarnings

warnings fixes
This commit is contained in:
Brad Davis 2015-11-01 16:16:17 -08:00
commit 71a6e783e3
16 changed files with 140 additions and 41 deletions

View file

@ -10,5 +10,35 @@
#
include(BundleUtilities)
# replace copy_resolved_item_into_bundle
#
# The official version of copy_resolved_item_into_bundle will print out a "warning:" when
# the resolved item matches the resolved embedded item. This not not really an issue that
# should rise to the level of a "warning" so we replace this message with a "status:"
#
function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
if(WIN32)
# ignore case on Windows
string(TOLOWER "${resolved_item}" resolved_item_compare)
string(TOLOWER "${resolved_embedded_item}" resolved_embedded_item_compare)
else()
set(resolved_item_compare "${resolved_item}")
set(resolved_embedded_item_compare "${resolved_embedded_item}")
endif()
if("${resolved_item_compare}" STREQUAL "${resolved_embedded_item_compare}")
# this is our only change from the original version
message(STATUS "status: resolved_item == resolved_embedded_item - not copying...")
else()
#message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy ${resolved_item} ${resolved_embedded_item}")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${resolved_item}" "${resolved_embedded_item}")
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
endif()
endif()
endfunction()
message(STATUS "FIXUP_LIBS for fixup_bundle called for bundle ${BUNDLE_EXECUTABLE} are @FIXUP_LIBS@")
fixup_bundle("${BUNDLE_EXECUTABLE}" "" "@FIXUP_LIBS@")

View file

@ -7,8 +7,11 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "DeviceProxy.h"
namespace controller {
}
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "DeviceProxy.h"

View file

@ -6,9 +6,11 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "Endpoint.h"
namespace controller {
}
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "Endpoint.h"

View file

@ -5,4 +5,11 @@
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "Mapping.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "Mapping.h"

View file

@ -6,4 +6,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "Route.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "Route.h"

View file

@ -6,4 +6,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "EndpointConditional.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "EndpointConditional.h"

View file

@ -6,4 +6,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "NotConditional.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "NotConditional.h"

View file

@ -6,4 +6,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "ArrayEndpoint.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "ArrayEndpoint.h"

View file

@ -6,4 +6,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "JSEndpoint.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "JSEndpoint.h"

View file

@ -6,4 +6,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "StandardEndpoint.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "StandardEndpoint.h"

View file

@ -6,4 +6,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "ConstrainToIntegerFilter.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "ConstrainToIntegerFilter.h"

View file

@ -6,4 +6,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "ConstrainToPositiveIntegerFilter.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "ConstrainToPositiveIntegerFilter.h"

View file

@ -6,4 +6,10 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "InvertFilter.h"
// NOTE: we don't need to include this header unless/until we add additional symbols.
// By removing this header we prevent these warnings on windows:
//
// warning LNK4221: This object file does not define any previously undefined public symbols,
// so it will not be used by any link operation that consumes this library
//
//#include "InvertFilter.h"

View file

@ -20,27 +20,27 @@
#ifdef HAVE_SDL2
static_assert(
controller::A == SDL_CONTROLLER_BUTTON_A &&
controller::B == SDL_CONTROLLER_BUTTON_B &&
controller::X == SDL_CONTROLLER_BUTTON_X &&
controller::Y == SDL_CONTROLLER_BUTTON_Y &&
controller::BACK == SDL_CONTROLLER_BUTTON_BACK &&
controller::GUIDE == SDL_CONTROLLER_BUTTON_GUIDE &&
controller::START == SDL_CONTROLLER_BUTTON_START &&
controller::LS == SDL_CONTROLLER_BUTTON_LEFTSTICK &&
controller::RS == SDL_CONTROLLER_BUTTON_RIGHTSTICK &&
controller::LB == SDL_CONTROLLER_BUTTON_LEFTSHOULDER &&
controller::RB == SDL_CONTROLLER_BUTTON_RIGHTSHOULDER &&
controller::DU == SDL_CONTROLLER_BUTTON_DPAD_UP &&
controller::DD == SDL_CONTROLLER_BUTTON_DPAD_DOWN &&
controller::DL == SDL_CONTROLLER_BUTTON_DPAD_LEFT &&
controller::DR == SDL_CONTROLLER_BUTTON_DPAD_RIGHT &&
controller::LX == SDL_CONTROLLER_AXIS_LEFTX &&
controller::LY == SDL_CONTROLLER_AXIS_LEFTY &&
controller::RX == SDL_CONTROLLER_AXIS_RIGHTX &&
controller::RY == SDL_CONTROLLER_AXIS_RIGHTY &&
controller::LT == SDL_CONTROLLER_AXIS_TRIGGERLEFT &&
controller::RT == SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
(int)controller::A == (int)SDL_CONTROLLER_BUTTON_A &&
(int)controller::B == (int)SDL_CONTROLLER_BUTTON_B &&
(int)controller::X == (int)SDL_CONTROLLER_BUTTON_X &&
(int)controller::Y == (int)SDL_CONTROLLER_BUTTON_Y &&
(int)controller::BACK == (int)SDL_CONTROLLER_BUTTON_BACK &&
(int)controller::GUIDE == (int)SDL_CONTROLLER_BUTTON_GUIDE &&
(int)controller::START == (int)SDL_CONTROLLER_BUTTON_START &&
(int)controller::LS == (int)SDL_CONTROLLER_BUTTON_LEFTSTICK &&
(int)controller::RS == (int)SDL_CONTROLLER_BUTTON_RIGHTSTICK &&
(int)controller::LB == (int)SDL_CONTROLLER_BUTTON_LEFTSHOULDER &&
(int)controller::RB == (int)SDL_CONTROLLER_BUTTON_RIGHTSHOULDER &&
(int)controller::DU == (int)SDL_CONTROLLER_BUTTON_DPAD_UP &&
(int)controller::DD == (int)SDL_CONTROLLER_BUTTON_DPAD_DOWN &&
(int)controller::DL == (int)SDL_CONTROLLER_BUTTON_DPAD_LEFT &&
(int)controller::DR == (int)SDL_CONTROLLER_BUTTON_DPAD_RIGHT &&
(int)controller::LX == (int)SDL_CONTROLLER_AXIS_LEFTX &&
(int)controller::LY == (int)SDL_CONTROLLER_AXIS_LEFTY &&
(int)controller::RX == (int)SDL_CONTROLLER_AXIS_RIGHTX &&
(int)controller::RY == (int)SDL_CONTROLLER_AXIS_RIGHTY &&
(int)controller::LT == (int)SDL_CONTROLLER_AXIS_TRIGGERLEFT &&
(int)controller::RT == (int)SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
"SDL2 equvalence: Enums and values from StandardControls.h are assumed to match enums from SDL_gamecontroller.h");
#endif

View file

@ -8,6 +8,9 @@
if (WIN32)
# we're using static GLEW, so define GLEW_STATIC
add_definitions(-DGLEW_STATIC)
set(TARGET_NAME oculus)
setup_hifi_plugin()
link_hifi_libraries(shared gl plugins display-plugins)

View file

@ -193,7 +193,7 @@ void OculusLegacyDisplayPlugin::deactivate() {
// DLL based display plugins MUST initialize GLEW inside the DLL code.
void OculusLegacyDisplayPlugin::customizeContext() {
glewExperimental = true;
GLenum err = glewInit();
glewInit();
glGetError();
WindowOpenGLDisplayPlugin::customizeContext();
}