Qt World Summit: Submit your Presentation

QtMultimedia Cmake

  • Hello, I wrote some months ago about a problem with qtCreator and Ros plugin the QtMultimedia library. Most of you invited me to install also Qt to solve this problem. I did it but same problem. I am using cmake and i cannot stil find a way to include qMultimedia library. Any suggestion? thank you all

  • I solved it!

    i need to add the path where to find the package so I add in my cmake

    set(CMAKE_PREFIX_PATH "/opt/5.12.4/gcc_64/lib/cmake/")
    find_package(Qt5Multimedia) #then the package
        ${Qt5Multimedia_INCLUDE_DIRS}  #the directories 

    and that's all!

  • Lifetime Qt Champion

    @AliM93 You can avoid hard coding the prefix file if you provide it as parameter when calling cmake:

    cmake -DCMAKE_PREFIX_PATH=/opt/5.12.4/gcc_64/lib/cmake/ ...

  • where i have to write it?

  • Lifetime Qt Champion

    @AliM93 When you call cmake. If you use QtCreator you should be able to set such variables.

Log in to reply