diff --git a/gvr-interface/src/GVRInterface.cpp b/gvr-interface/src/GVRInterface.cpp index ef5a05099d..57907ee752 100644 --- a/gvr-interface/src/GVRInterface.cpp +++ b/gvr-interface/src/GVRInterface.cpp @@ -9,8 +9,13 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#ifdef Q_OS_ANDROID + #include #include + +#endif + #include #include #include @@ -37,7 +42,7 @@ GVRInterface::GVRInterface(int argc, char* argv[]) : connect(this, &QGuiApplication::applicationStateChanged, this, &GVRInterface::handleApplicationStateChange); -#ifdef Q_OS_ANDROID && HAVE_LIBOVR +#if defined(Q_OS_ANDROID) && defined(HAVE_LIBOVR) QAndroidJniEnvironment jniEnv; QPlatformNativeInterface* interface = QApplication::platformNativeInterface(); @@ -54,7 +59,7 @@ GVRInterface::GVRInterface(int argc, char* argv[]) : } void GVRInterface::idle() { -#ifdef Q_OS_ANDROID && HAVE_LIBOVR +#if defined(Q_OS_ANDROID) && defined(HAVE_LIBOVR) if (!_inVRMode && ovr_IsHeadsetDocked()) { qDebug() << "The headset just got docked - assume we are in VR mode."; _inVRMode = true; diff --git a/gvr-interface/src/GVRMainWindow.cpp b/gvr-interface/src/GVRMainWindow.cpp index 4ef55785f6..310d24e5c5 100644 --- a/gvr-interface/src/GVRMainWindow.cpp +++ b/gvr-interface/src/GVRMainWindow.cpp @@ -14,6 +14,10 @@ #include #include +#ifndef Q_OS_ANDROID +#include +#endif + #include #include "InterfaceView.h" @@ -24,6 +28,13 @@ GVRMainWindow::GVRMainWindow(QWidget* parent) : QMainWindow(parent) { + +#ifndef Q_OS_ANDROID + const int NOTE_4_WIDTH = 2560; + const int NOTE_4_HEIGHT = 1440; + setFixedSize(NOTE_4_WIDTH / 2, NOTE_4_HEIGHT / 2); +#endif + QMenu* fileMenu = new QMenu("File"); QMenu* helpMenu = new QMenu("Help"); diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 020adfbd61..406c06ccb3 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -183,12 +183,10 @@ add_definitions(-DQT_NO_BEARERMANAGEMENT) if (APPLE) # link in required OS X frameworks and include the right GL headers - find_library(CoreAudio CoreAudio) - find_library(CoreFoundation CoreFoundation) find_library(OpenGL OpenGL) find_library(AppKit AppKit) - target_link_libraries(${TARGET_NAME} ${CoreAudio} ${CoreFoundation} ${OpenGL} ${AppKit}) + target_link_libraries(${TARGET_NAME} ${OpenGL} ${AppKit}) # install command for OS X bundle INSTALL(TARGETS ${TARGET_NAME} diff --git a/libraries/audio-client/CMakeLists.txt b/libraries/audio-client/CMakeLists.txt index 6b24ebcb93..5477be3bc5 100644 --- a/libraries/audio-client/CMakeLists.txt +++ b/libraries/audio-client/CMakeLists.txt @@ -25,5 +25,11 @@ find_package(Soxr REQUIRED) target_link_libraries(${TARGET_NAME} ${SOXR_LIBRARIES}) include_directories(SYSTEM ${SOXR_INCLUDE_DIRS}) +if (APPLE) + find_library(CoreAudio CoreAudio) + find_library(CoreFoundation CoreFoundation) + target_link_libraries(${TARGET_NAME} ${CoreAudio} ${CoreFoundation}) +endif () + # call macro to include our dependency includes and bubble them up via a property on our target include_dependency_includes() \ No newline at end of file