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. came across the following error while converting qmake project to cmake ,please anyone can help?
Forum Updated to NodeBB v4.3 + New Features

came across the following error while converting qmake project to cmake ,please anyone can help?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 273 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.
  • S Offline
    S Offline
    selvam
    wrote on last edited by
    #1

    CMake Error at CMakeLists.txt:14 (find_package):
    By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "Qt5", but
    CMake did not find one.

    Could not find a package configuration file provided by "Qt5" with any of
    the following names:

    Qt5Config.cmake
    qt5-config.cmake
    

    Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
    to a directory containing one of the above files. If "Qt5" provides a
    separate development package or SDK, be sure it has been installed.

    -- Configuring incomplete, errors occurred!

    sierdzioS 1 Reply Last reply
    0
    • S selvam

      CMake Error at CMakeLists.txt:14 (find_package):
      By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "Qt5", but
      CMake did not find one.

      Could not find a package configuration file provided by "Qt5" with any of
      the following names:

      Qt5Config.cmake
      qt5-config.cmake
      

      Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
      to a directory containing one of the above files. If "Qt5" provides a
      separate development package or SDK, be sure it has been installed.

      -- Configuring incomplete, errors occurred!

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @selvam Are you getting this in some IDE like Qt Creator or when building from command line?

      Looks like cmake can't find Qt. If you are building from terminal, you need to add this to point cmake in the right direction:

      cmake -DCMAKE_PREFIX_PATH=/path/to/qt/5.15.2/lib/cmake [other flags you are using....]
      

      (Z(:^

      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