Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Using compiled Qt5 with CMake on ARM Linux
Forum Updated to NodeBB v4.3 + New Features

Using compiled Qt5 with CMake on ARM Linux

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 2.2k Views 1 Watching
  • 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.
  • ShervinEmamiS Offline
    ShervinEmamiS Offline
    ShervinEmami
    wrote on last edited by
    #1

    Hi, I tried to build Qt5 Desktop Open-Source natively on an ARM dev board, I was able to get everything except Qt Multimedia built, but I couldn't get it build and I only actually need Qt Base so I'm trying to use Qt Base even though Qt5 hasn't been fully built & installed. I can build & run the various Qt5 examples using the supplied Makefiles, but I'm trying to use CMake in my project, and can't figure out how to get CMake to find Qt5. Does anyone know how to get CMake to find Qt5, if I know where the CMake files are?

    When I run cmake I get the error:

    CMake Error at CMakeLists.txt:18 (find_package):
    By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
    has asked CMake to find a package configuration file provided by
    "Qt5Widgets", but CMake did not find one.
    
    Could not find a package configuration file provided by "Qt5Widgets" with
    any of the following names:
    
    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake
    
    Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
    "Qt5Widgets_DIR" to a directory containing one of the above files. If
    "Qt5Widgets" provides a separate development package or SDK, be sure it has
    been installed.
    

    I found that file: "~/qt-everywhere-opensource-src-5.6.0/qtbase/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake" but if I set CMAKE_PREFIX_PATH or Qt5Widgets_DIR to that folder, it still doesn't work. Any ideas?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      It's CMAKE_PREFIX_PATH=~/qt-everywhere-opensource-src-5.6.0/qtbase/lib/cmake and you should be good to go.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      ShervinEmamiS 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi and welcome to devnet,

        It's CMAKE_PREFIX_PATH=~/qt-everywhere-opensource-src-5.6.0/qtbase/lib/cmake and you should be good to go.

        ShervinEmamiS Offline
        ShervinEmamiS Offline
        ShervinEmami
        wrote on last edited by
        #3

        @SGaist Thanks it worked! I thought I had already tried that combination but I guess not. Any chance you also know how to build Qt5 from source but skip Qt Multimedia? I tried "-skip multimedia" when configuring Qt5 but it still ended up trying to build Qt Multimedia.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          If skip doesn't work, just move the qtmultimedia folder out of the source tree when calling configure.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

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