Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. How to update CmakeLists.txt for android build from qt5 to qt6?
Qt 6.11 is out! See what's new in the release blog

How to update CmakeLists.txt for android build from qt5 to qt6?

Scheduled Pinned Locked Moved Unsolved Qt 6
1 Posts 1 Posters 2.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yukishiro
    wrote on last edited by
    #1

    I have CmakeLists.txt script to build android project with qt5. But when I build my project with this script, I get this error: Product type is not an application, not building an APK.
    Here is part of script for build settings.

    if(ANDROID)
        add_library(${module_name} SHARED
            ${SRC_FILES}
            ${QM_FILES}
        )
        set_target_properties(
            ${module_name}
            PROPERTIES LIBRARY_OUTPUT_NAME qlcplus)
    else()
        add_executable(${module_name} WIN32
            ${SRC_FILES}
            ${QM_FILES}
        )
    endif()
    

    And this script is used in root CmakeLists.txt.

    add_subdirectory(qmlui)
    

    How to solve this error?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved