Skip to content

Commit

Permalink
Work on CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Feb 6, 2024
1 parent d1ae105 commit bf8261e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 3.20)

project(QmlAppTemplate VERSION 0.6 LANGUAGES CXX)

Expand Down Expand Up @@ -73,7 +73,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE

## Android
if(ANDROID)
set_target_properties(QmlAppTemplate PROPERTIES
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
QT_ANDROID_ABIS "armeabi-v7a;arm64-v8a;x86;x86_64"
QT_ANDROID_BUILD_ALL_ABIS ON
QT_ANDROID_MIN_SDK_VERSION 23
Expand Down Expand Up @@ -146,13 +146,13 @@ install(TARGETS ${CMAKE_PROJECT_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

#qt_generate_deploy_qml_app_script(
# TARGET ${CMAKE_PROJECT_NAME}
# OUTPUT_SCRIPT deploy_script
# NO_UNSUPPORTED_PLATFORM_ERROR
# DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
# MACOS_BUNDLE_POST_BUILD
#)
#install(SCRIPT ${deploy_script})
qt_generate_deploy_qml_app_script(
TARGET ${CMAKE_PROJECT_NAME}
OUTPUT_SCRIPT deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR
DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
MACOS_BUNDLE_POST_BUILD
)
install(SCRIPT ${deploy_script})

################################################################################
4 changes: 2 additions & 2 deletions assets/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
targetSdkVersion qtTargetSdkVersion

namespace "io.emeric.qmlapptemplate"
//versionName "0.6" // handled by cmake
//versionCode timestampInt // handled by cmake
versionName "0.6"
versionCode timestampInt
}

packagingOptions {
Expand Down
9 changes: 7 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@

int main(int argc, char *argv[])
{
// GUI application /////////////////////////////////////////////////////////
// Couple of debug stuff you can enable
//qputenv("QSG_INFO", "1"); // print Qt Scene Graph info
//qputenv("QT_QPA_EGLFS_DEBUG", "1"); // print Qt Platform Abstraction EGL debug info
//qputenv("QT_DEBUG_PLUGINS", "1"); // print Qt plugins info

#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
// NVIDIA driver suspend&resume hack
Expand All @@ -53,7 +56,9 @@ int main(int argc, char *argv[])
QSurfaceFormat::setDefaultFormat(format);
#endif

SingleApplication app(argc, argv);
// GUI application /////////////////////////////////////////////////////////

SingleApplication app(argc, argv, false);

// Application name
app.setApplicationName("QmlAppTemplate");
Expand Down

0 comments on commit bf8261e

Please sign in to comment.