From 7dd8a62ceddbb2205bd41260964f3450e72fccab Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 18 Aug 2016 21:38:13 -0700 Subject: [PATCH] Don't build Kirigami as a library Just link it directly into Subsurface-mobile. That's what we already do with the qmake file for iOS, now the cmake based builds do the same. This should remove a lot of issues. Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 8 ++++---- packaging/android/build.sh | 6 ------ scripts/build.sh | 8 -------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a824d0364..8efd34b2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,26 +228,26 @@ if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable") set(MOBILE_SRC mobile-widgets/qmlmanager.cpp mobile-widgets/qmlprofile.cpp + mobile-widgets/qml/kirigami/src/kirigamiplugin.cpp + mobile-widgets/qml/kirigami/src/enums.cpp subsurface-mobile-main.cpp subsurface-mobile-helper.cpp ) + add_definitions(-DKIRIGAMI_BUILD_TYPE_STATIC) qt5_add_resources(MOBILE_RESOURCES mobile-widgets/qml/mobile-resources.qrc) + qt5_add_resources(MOBILE_RESOURCES mobile-widgets/qml/kirigami/kirigami.qrc) # When building the mobile application in Android, link it and Qt will do the rest, when doing the mobile application on Desktop, create an executable. if(ANDROID) add_library(${SUBSURFACE_TARGET} SHARED ${SUBSURFACE_PKG} ${MOBILE_SRC} ${SUBSURFACE_RESOURCES} ${MOBILE_RESOURCES}) else() add_executable(${SUBSURFACE_TARGET} MACOSX_BUNDLE WIN32 ${SUBSURFACE_PKG} ${MOBILE_SRC} ${SUBSURFACE_RESOURCES} ${MOBILE_RESOURCES}) endif() - ADD_LIBRARY(kirigami_static_library STATIC IMPORTED) - SET_TARGET_PROPERTIES(kirigami_static_library PROPERTIES - IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/../kirigami-build/src/libkirigamiplugin.a) target_link_libraries( ${SUBSURFACE_TARGET} subsurface_profile subsurface_models subsurface_corelib ${SUBSURFACE_LINK_LIBRARIES} - kirigami_static_library ) elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable") set(SUBSURFACE_APP diff --git a/packaging/android/build.sh b/packaging/android/build.sh index d844e8dca..408a5467d 100644 --- a/packaging/android/build.sh +++ b/packaging/android/build.sh @@ -316,12 +316,6 @@ if [ "$SUBSURFACE_MOBILE" = "ON" ] ; then pushd $SUBSURFACE_SOURCE bash ./scripts/mobilecomponents.sh popd - rm -rf kirigami-build - mkdir -p kirigami-build - pushd kirigami-build - cmake $SUBSURFACE_SOURCE/mobile-widgets/qml/kirigami/ -DSTATIC_LIBRARY=ON -DCMAKE_PREFIX_PATH:UNINITIALIZED=${QT5_ANDROID}/android_${QT_ARCH}/lib/cmake - make -j4 - popd fi if [ ! -z "$SUBSURFACE_MOBILE" ] ; then diff --git a/scripts/build.sh b/scripts/build.sh index 9f785db1a..873bba789 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -237,14 +237,6 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do if [ "$SUBSURFACE_EXECUTABLE" = "MobileExecutable" ] ; then cd $SRC/subsurface bash ./scripts/mobilecomponents.sh - cd mobile-widgets/qml/kirigami - # hack to work around issue in current kirigami - sed -i.bak -e '/styles\/Desktop\/ContextDrawer.qml/d' kirigami.qrc - sed -i.bak -e '/ecm_create_qm_loader/d' src/CMakeLists.txt - mkdir -p $SRC/kirigami-build - cd $SRC/kirigami-build - cmake $SRC/subsurface/mobile-widgets/qml/kirigami/ -DSTATIC_LIBRARY=ON - make -j4 fi mkdir -p $SRC/subsurface/$BUILDDIR