Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Installing CMake static target with QML module
Forum Updated to NodeBB v4.3 + New Features

Installing CMake static target with QML module

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 40 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.
  • K Offline
    K Offline
    Kritz
    wrote last edited by
    #1

    Hi everyone,

    I have a static library target with a QML module that works fine in its own project and installs as well. But another project uses the installed library gives an error saying:

    Objects of target "QTTest::GuiA_resources_1" referenced but is not one
      of the allowed target types (EXECUTABLE, STATIC, SHARED, MODULE, OBJECT).
    

    I used the code below to create the qml module and install the target.

    qt_add_qml_module(GuiA
        URI qttest
        OUTPUT_DIRECTORY qtbin/qttest
        OUTPUT_TARGETS _qt_output_targets
        QML_FILES
            qml/Ascreen.qml
    )
    # Value of the _qt_output_targets = GuiA_resources_1;GuiA_resources_2;GuiA_resources_3;GuiAplugin_init
    install(
        TARGETS GuiA ${_qt_output_targets}
        EXPORT GuiATargets
    )
    

    What am I doint wrong here?

    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