diff --git a/BUILD_ANDROID.md b/BUILD_ANDROID.md index 7e159bf7a8..88b363e9e6 100644 --- a/BUILD_ANDROID.md +++ b/BUILD_ANDROID.md @@ -44,7 +44,7 @@ make depend make all ``` -This should generate libcrypto and libssl in the root of the OpenSSL directory. +This should generate libcrypto and libssl in the root of the OpenSSL directory. YOU MUST remove the `libssl.so` and `libcrypto.so` files that are generated. They are symlinks to `libssl.so.VER` and `libcrypto.so.VER` which Android does not know how to handle. By removing `libssl.so` and `libcrypto.so` the FindOpenSSL module will find the static libs and use those instead. If you have been building other components it is possible that the OpenSSL compile will fail based on the values other cross-compilations (tbb, bullet) have set. Ensure that you are in a new terminal window to avoid compilation errors from previously set environment variables. diff --git a/cmake/android/QtCreateAPK.cmake b/cmake/android/QtCreateAPK.cmake index dc87606442..e43a03eab9 100644 --- a/cmake/android/QtCreateAPK.cmake +++ b/cmake/android/QtCreateAPK.cmake @@ -72,11 +72,23 @@ macro(qt_create_apk) else () if(NOT _DEP MATCHES "Qt5::.*") get_property(_DEP_LOCATION TARGET ${_DEP} PROPERTY "LOCATION_${CMAKE_BUILD_TYPE}") + + # recurisvely add libraries which are dependencies of this target + get_property(_DEP_DEPENDENCIES TARGET ${_DEP} PROPERTY INTERFACE_LINK_LIBRARIES) + + foreach(_SUB_DEP IN LISTS _DEP_DEPENDENCIES) + if (NOT TARGET ${_SUB_DEP} AND NOT _SUB_DEP MATCHES "Qt5::.*") + list(APPEND _DEPS_LIST ${_SUB_DEP}) + endif() + endforeach() + list(APPEND _DEPS_LIST ${_DEP_LOCATION}) endif() endif () endforeach() + list(REMOVE_DUPLICATES _DEPS_LIST) + # just copy static libs to apk libs folder - don't add to deps list foreach(_LOCATED_DEP IN LISTS _DEPS_LIST) if (_LOCATED_DEP MATCHES "\\.a$") diff --git a/gvr-interface/CMakeLists.txt b/gvr-interface/CMakeLists.txt index 65e798d28a..dae4a71392 100644 --- a/gvr-interface/CMakeLists.txt +++ b/gvr-interface/CMakeLists.txt @@ -6,7 +6,7 @@ set(ANDROID_APK_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/apk") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${ANDROID_APK_OUTPUT_DIR}/libs/${ANDROID_ABI}") set(BUILD_SHARED_LIBS ON) -setup_hifi_library() +setup_hifi_library(Gui Widgets) include_glm() diff --git a/gvr-interface/src/GVRInterface.cpp b/gvr-interface/src/GVRInterface.cpp index 7a8d1af7e4..31b45bc803 100644 --- a/gvr-interface/src/GVRInterface.cpp +++ b/gvr-interface/src/GVRInterface.cpp @@ -9,16 +9,14 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include +#include +#include #include "GVRInterface.h" GVRInterface::GVRInterface(int argc, char* argv[]) : - QGuiApplication(argc, argv) + QApplication(argc, argv) { - -} - -void GVRInterface::processDatagrams() { - + QMainWindow mainWindow; + mainWindow.menuBar()->addAction("Go to Address"); } \ No newline at end of file diff --git a/gvr-interface/src/GVRInterface.h b/gvr-interface/src/GVRInterface.h index b318dabedd..de820a35db 100644 --- a/gvr-interface/src/GVRInterface.h +++ b/gvr-interface/src/GVRInterface.h @@ -12,14 +12,12 @@ #ifndef hifi_GVRInterface_h #define hifi_GVRInterface_h -#include +#include -class GVRInterface : public QGuiApplication { +class GVRInterface : public QApplication { Q_OBJECT public: GVRInterface(int argc, char* argv[]); -private slots: - void processDatagrams(); }; #endif // hifi_GVRInterface_h