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. QtMultimedia Cmake
Forum Updated to NodeBB v4.3 + New Features

QtMultimedia Cmake

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 2.0k 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.
  • A Offline
    A Offline
    AliM93
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AliM93
      wrote on last edited by
      #2

      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
      
      include_directories(
          ${Qt5Core_INCLUDE_DIRS}
          ${Qt5Gui_INCLUDE_DIRS}
          ${Qt5Widgets_INCLUDE_DIRS}
          ${Qt5PrintSupport_INCLUDE_DIRS}
          ${Qt5Sql_INCLUDE_DIRS}
          ${Qt5Multimedia_INCLUDE_DIRS}  #the directories 
      
      
      
      
      
          )
      
      
      

      and that's all!
      thanks
      cheers

      jsulmJ 1 Reply Last reply
      0
      • A AliM93

        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
        
        include_directories(
            ${Qt5Core_INCLUDE_DIRS}
            ${Qt5Gui_INCLUDE_DIRS}
            ${Qt5Widgets_INCLUDE_DIRS}
            ${Qt5PrintSupport_INCLUDE_DIRS}
            ${Qt5Sql_INCLUDE_DIRS}
            ${Qt5Multimedia_INCLUDE_DIRS}  #the directories 
        
        
        
        
        
            )
        
        
        

        and that's all!
        thanks
        cheers

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @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/ ...
        

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • A Offline
          A Offline
          AliM93
          wrote on last edited by
          #4

          where i have to write it?

          jsulmJ 1 Reply Last reply
          0
          • A AliM93

            where i have to write it?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

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

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            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