From a01a4f929f50d99e4e45406ce3072991821b3e66 Mon Sep 17 00:00:00 2001 From: Sam Gondelman Date: Thu, 30 Jul 2015 15:14:51 -0700 Subject: [PATCH] removing unnecessary weak link --- cmake/modules/Find3DConnexionClient.cmake | 1 - interface/src/devices/3DConnexionClient.cpp | 13 ++----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/cmake/modules/Find3DConnexionClient.cmake b/cmake/modules/Find3DConnexionClient.cmake index 2b5508cfcc..522c25478e 100644 --- a/cmake/modules/Find3DConnexionClient.cmake +++ b/cmake/modules/Find3DConnexionClient.cmake @@ -23,7 +23,6 @@ if (APPLE) set(3DCONNEXIONCLIENT_FOUND true) set(3DCONNEXIONCLIENT_INCLUDE_DIRS ${3DConnexionClient}) set(3DCONNEXIONCLIENT_LIBRARY ${3DConnexionClient}) - set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS "-weak_framework 3DConnexionClient") message(STATUS "Found 3DConnexion at " ${3DConnexionClient}) mark_as_advanced(3DCONNEXIONCLIENT_INCLUDE_DIR CONNEXIONCLIENT_LIBRARY) else () diff --git a/interface/src/devices/3DConnexionClient.cpp b/interface/src/devices/3DConnexionClient.cpp index 4743370778..2e0a30715c 100755 --- a/interface/src/devices/3DConnexionClient.cpp +++ b/interface/src/devices/3DConnexionClient.cpp @@ -872,13 +872,6 @@ void MouseParameters::SetPivotVisibility(PivotVisibility visibility) { #else -#define WITH_SEPARATE_THREAD false // set to true or false - -// Make the linker happy for the framework check (see link below for more info) -// http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html - -extern int16_t SetConnexionHandlers(ConnexionMessageHandlerProc messageHandler, ConnexionAddedHandlerProc addedHandler, ConnexionRemovedHandlerProc removedHandler, bool useSeparateThread) __attribute__((weak_import)); - int fConnexionClientID; static ConnexionDeviceState lastState; @@ -887,20 +880,18 @@ static void DeviceAddedHandler(unsigned int connection); static void DeviceRemovedHandler(unsigned int connection); static void MessageHandler(unsigned int connection, unsigned int messageType, void *messageArgument); -void ConnexionClient::toggleConnexion(bool shouldEnable) -{ +void ConnexionClient::toggleConnexion(bool shouldEnable) { if (shouldEnable && !ConnexionClient::Is3dmouseAttached()) { ConnexionClient::init(); } if (!shouldEnable && ConnexionClient::Is3dmouseAttached()) { ConnexionClient::destroy(); } - } void ConnexionClient::init() { // Make sure the framework is installed - if (SetConnexionHandlers != NULL && Menu::getInstance()->isOptionChecked(MenuOption::Connexion)) { + if (Menu::getInstance()->isOptionChecked(MenuOption::Connexion)) { // Install message handler and register our client InstallConnexionHandlers(MessageHandler, DeviceAddedHandler, DeviceRemovedHandler); // Either use this to take over in our application only... does not work