Ask Your Question
0

CMAKE error: Can´t find Qt5CoreConfig.cmake

asked 2020-07-03 17:02:17 +0000

Christian_R gravatar image

updated 2020-07-03 17:18:05 +0000

Hello,

I try to set up a new Build Environment for Windows:

I use:

  • Wireshark 3.2.5
  • CMAKE 3.12.17
  • QT 5.12.9
  • Visual Studio 2019

What did I miss?

> C:\Development\wsbuild64>cmake -G
> "Visual Studio 16 2019" ..\wireshark 
> 2>&1 1>C:\Development\cmake64_log.txt
> CMake Warning (dev) at C:/Program
> Files/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272
> (message):   The package name passed
> to `find_package_handle_standard_args`
> (POWERSHELL)   does not match the name
> of the calling package (PowerShell). 
> This can lead   to problems in calling
> code that expects `find_package`
> result variables   (e.g., `_FOUND`) to
> follow a certain pattern. Call Stack
> (most recent call first):  
> cmake/modules/FindPowerShell.cmake:17
> (find_package_handle_standard_args)  
> CMakeLists.txt:64 (find_package) This
> warning is for project developers. 
> Use -Wno-dev to suppress it.
> 
> CMake Error at CMakeLists.txt:1098
> (find_package):   By not providing
> "FindQt5Core.cmake" in
> CMAKE_MODULE_PATH this project has  
> asked CMake to find a package
> configuration file provided by
> "Qt5Core", but   CMake did not find
> one.
> 
>   Could not find a package
> configuration file provided by
> "Qt5Core" with any   of the following
> names:
> 
>     Qt5CoreConfig.cmake
>     qt5core-config.cmake
> 
>   Add the installation prefix of
> "Qt5Core" to CMAKE_PREFIX_PATH or set 
> "Qt5Core_DIR" to a directory
> containing one of the above files.  If
> "Qt5Core" provides a separate
> development package or SDK, be sure it
> has   been installed.
edit retag flag offensive close merge delete

Comments

What do you have set in the env variable QT5_BASE_DIR? See the developers guide section on Opening a Visual Studio Command Prompt.

Also check your Qt install.

grahamb gravatar imagegrahamb ( 2020-07-03 17:06:40 +0000 )edit

It says: C:\Qt\5.12.9\5.12.9\msvc2017_64\

Now it has found somehow this files, don´t know why. But I have now an error with the follwing file:

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

    Qt5MultimediaConfig.cmake
    qt5multimedia-config.cmake

  Add the installation prefix of "Qt5Multimedia" to CMAKE_PREFIX_PATH or set
  "Qt5Multimedia_DIR" to a directory containing one of the above files.  If
  "Qt5Multimedia" provides a separate development package or SDK, be sure it
  has been installed.
Christian_R gravatar imageChristian_R ( 2020-07-03 18:02:01 +0000 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-07-03 18:07:52 +0000

grahamb gravatar image

updated 2020-07-03 18:09:38 +0000

It says: C:\Qt\5.12.9\5.12.9\msvc2017_64\

Not sure about the trailing slash, you also seem to have an extra "5.12.9" in the path from what I normally have, but that might be correct for your installation.

How\what did you install when installing Qt? The Qt folks are fond of rearranging their installers. IIRC I just made sure the top level checkbox for 5.12.x msvc2017_64 was checked.

edit flag offensive delete link more

Comments

Great thx @grahamb you found it.

I missed two letters in the path.

So after correcting the path to:

C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\

it has worked.

Christian_R gravatar imageChristian_R ( 2020-07-03 18:08:07 +0000 )edit

BTW: This is in my installation always the default installation with this doubled Version Infos in the path. I use the default installation of QT5 offline installer.

But I guess, that I will come back with some msbuild errors :)

Christian_R gravatar imageChristian_R ( 2020-07-03 18:09:22 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-07-03 17:02:17 +0000

Seen: 5,916 times

Last updated: Jul 03 '20