Qt5 how to add axcontainer(ActiveQt) to CMake Project

  • I am attempting to invoke a c# method from inside a QT project. In a qmake project, I was able to do this using the below line in the .pro file.

    QT      += core gui axcontainer

    what should I do to emulate the above in a CMake project?

  • Managed to get this working myself by adding the below in cmakelists.txt.

    find_package(Qt5AxContainer REQUIRED)
    include_directories(${Qt5Widgets_INCLUDES}  ${Qt5AxContainer_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} ${Qt5AxContainer_LIBRARIES})

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.