diff --git a/cmake/templates/FixupBundlePostBuild.cmake.in b/cmake/templates/FixupBundlePostBuild.cmake.in index 7d98e9796c..4afe4de403 100644 --- a/cmake/templates/FixupBundlePostBuild.cmake.in +++ b/cmake/templates/FixupBundlePostBuild.cmake.in @@ -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@") \ No newline at end of file diff --git a/libraries/controllers/src/controllers/DeviceProxy.cpp b/libraries/controllers/src/controllers/DeviceProxy.cpp index f3e9526080..f03354c52d 100644 --- a/libraries/controllers/src/controllers/DeviceProxy.cpp +++ b/libraries/controllers/src/controllers/DeviceProxy.cpp @@ -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" diff --git a/libraries/controllers/src/controllers/impl/Endpoint.cpp b/libraries/controllers/src/controllers/impl/Endpoint.cpp index 9e9b13f8ea..e771b1916f 100644 --- a/libraries/controllers/src/controllers/impl/Endpoint.cpp +++ b/libraries/controllers/src/controllers/impl/Endpoint.cpp @@ -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" diff --git a/libraries/controllers/src/controllers/impl/Mapping.cpp b/libraries/controllers/src/controllers/impl/Mapping.cpp index 68c43da393..dd8e1c1d48 100644 --- a/libraries/controllers/src/controllers/impl/Mapping.cpp +++ b/libraries/controllers/src/controllers/impl/Mapping.cpp @@ -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" diff --git a/libraries/controllers/src/controllers/impl/Route.cpp b/libraries/controllers/src/controllers/impl/Route.cpp index 56590e564a..c74f809195 100644 --- a/libraries/controllers/src/controllers/impl/Route.cpp +++ b/libraries/controllers/src/controllers/impl/Route.cpp @@ -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" diff --git a/libraries/controllers/src/controllers/impl/conditionals/EndpointConditional.cpp b/libraries/controllers/src/controllers/impl/conditionals/EndpointConditional.cpp index 03e16b8cf9..f833eedb60 100644 --- a/libraries/controllers/src/controllers/impl/conditionals/EndpointConditional.cpp +++ b/libraries/controllers/src/controllers/impl/conditionals/EndpointConditional.cpp @@ -6,4 +6,10 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "EndpointConditional.h" \ No newline at end of file +// 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" \ No newline at end of file diff --git a/libraries/controllers/src/controllers/impl/conditionals/NotConditional.cpp b/libraries/controllers/src/controllers/impl/conditionals/NotConditional.cpp index 0c8d602b9e..e30b060985 100644 --- a/libraries/controllers/src/controllers/impl/conditionals/NotConditional.cpp +++ b/libraries/controllers/src/controllers/impl/conditionals/NotConditional.cpp @@ -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" diff --git a/libraries/controllers/src/controllers/impl/endpoints/ArrayEndpoint.cpp b/libraries/controllers/src/controllers/impl/endpoints/ArrayEndpoint.cpp index c083a7147d..5dea1de34e 100644 --- a/libraries/controllers/src/controllers/impl/endpoints/ArrayEndpoint.cpp +++ b/libraries/controllers/src/controllers/impl/endpoints/ArrayEndpoint.cpp @@ -6,4 +6,10 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "ArrayEndpoint.h" \ No newline at end of file +// 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" \ No newline at end of file diff --git a/libraries/controllers/src/controllers/impl/endpoints/JSEndpoint.cpp b/libraries/controllers/src/controllers/impl/endpoints/JSEndpoint.cpp index 4560741d12..7f0e80cbae 100644 --- a/libraries/controllers/src/controllers/impl/endpoints/JSEndpoint.cpp +++ b/libraries/controllers/src/controllers/impl/endpoints/JSEndpoint.cpp @@ -6,4 +6,10 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "JSEndpoint.h" \ No newline at end of file +// 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" \ No newline at end of file diff --git a/libraries/controllers/src/controllers/impl/endpoints/StandardEndpoint.cpp b/libraries/controllers/src/controllers/impl/endpoints/StandardEndpoint.cpp index 09920d249c..89bbe5d777 100644 --- a/libraries/controllers/src/controllers/impl/endpoints/StandardEndpoint.cpp +++ b/libraries/controllers/src/controllers/impl/endpoints/StandardEndpoint.cpp @@ -6,4 +6,10 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "StandardEndpoint.h" \ No newline at end of file +// 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" \ No newline at end of file diff --git a/libraries/controllers/src/controllers/impl/filters/ConstrainToIntegerFilter.cpp b/libraries/controllers/src/controllers/impl/filters/ConstrainToIntegerFilter.cpp index 78ffb47693..8bd3d2db89 100644 --- a/libraries/controllers/src/controllers/impl/filters/ConstrainToIntegerFilter.cpp +++ b/libraries/controllers/src/controllers/impl/filters/ConstrainToIntegerFilter.cpp @@ -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" diff --git a/libraries/controllers/src/controllers/impl/filters/ConstrainToPositiveIntegerFilter.cpp b/libraries/controllers/src/controllers/impl/filters/ConstrainToPositiveIntegerFilter.cpp index d78942b18f..f1abc8cecd 100644 --- a/libraries/controllers/src/controllers/impl/filters/ConstrainToPositiveIntegerFilter.cpp +++ b/libraries/controllers/src/controllers/impl/filters/ConstrainToPositiveIntegerFilter.cpp @@ -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" diff --git a/libraries/controllers/src/controllers/impl/filters/InvertFilter.cpp b/libraries/controllers/src/controllers/impl/filters/InvertFilter.cpp index db582b84cc..5407c6dd1d 100644 --- a/libraries/controllers/src/controllers/impl/filters/InvertFilter.cpp +++ b/libraries/controllers/src/controllers/impl/filters/InvertFilter.cpp @@ -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" diff --git a/libraries/input-plugins/src/input-plugins/SDL2Manager.cpp b/libraries/input-plugins/src/input-plugins/SDL2Manager.cpp index ec2fa2ed07..c6f5491a5a 100644 --- a/libraries/input-plugins/src/input-plugins/SDL2Manager.cpp +++ b/libraries/input-plugins/src/input-plugins/SDL2Manager.cpp @@ -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 diff --git a/plugins/oculus/CMakeLists.txt b/plugins/oculus/CMakeLists.txt index 62999cbb7e..fe1a87d6b6 100644 --- a/plugins/oculus/CMakeLists.txt +++ b/plugins/oculus/CMakeLists.txt @@ -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) diff --git a/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.cpp b/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.cpp index 0120bcf2aa..d8dc3667ae 100644 --- a/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.cpp +++ b/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.cpp @@ -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(); }