13306

How to solve qt5 (packages not found) cmake errors in mac?

Question:

I get these following errors during build of a file using CMake:

CMake Warning at CMakeLists.txt:33 (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

Anybody know how to solve this? Thanks in advance

Answer1:

You should find the cmake packages in your Qt installation in:

<install_prefix>/lib/cmake

Assuming <install_prefix> is the root path of your installation. Set the variable Qt5_DIR to <install_prefix>/lib/cmake/Qt5 in your configuration and cmake should be able to find all the modules

Answer2:

Maybe, you should try to add the proper path to the CMAKE_PREFIX_PATH variable in the environment or config.

export CMAKE_PREFIX_PATH=path_to/Qt/5.9/clang_64;$CMAKE_PREFIX_PATH

Replace path_to with your real path.

Recommend

  • How to browse android SDK sources in Android studio 2.0
  • Is it possible to ask GIT, don't show a file?
  • How to generate an asynchronous reset verilog always blocks with chisel
  • PHP file_exists() anomaly
  • How Does Navigation in xamarin.forms Works?
  • How could I prohibit anonymous access to my NodeRed UI Dashboard on IBM Cloud(Bluemix)?
  • call a java program from a webapp in tomcat server - the java program is out side of tomcat server
  • It is possible use the same sql azure instance from two different cloud service of two different sub
  • Microsoft Excel Pivot miscalculation in Sum for positive and negative numbers
  • How to create two column output from a single column
  • Retaining data after updating application
  • How can we prepend rows to a react native list-view?
  • C# List of Panels
  • Creating PDF from TIFF image using iText
  • How to get data from **Realm database** using **date object**?
  • Hide HTML elements without javascript, only CSS
  • How to access culture data in globalize.js V1.0.0
  • where do I find the xml.dom python package for the python-2.6.0-8.9.28 and I have a suse/x86_64 vers
  • Spring boot 2.0.0.M4 required a bean named 'entityManagerFactory' that could not be found
  • List images(01.png) and descriptions(01.txt) from directory
  • Is it possible to open regedit and navigate to straight to a specific key using process.start?
  • Read text file that is not in the main package in a runnable jar
  • Roxygen error “Skipping invalid path”
  • Spring Cloud Microservice Architecture Confusion
  • Installed module is empty
  • PHPUnit_Framework_TestCase class is not available. Fix… - Makegood , Eclipse
  • How can I send an e-mail from a vbs script
  • ORA-29908: missing primary invocation for ancillary operator
  • R: gsub and capture
  • Is there a mandatory requirement to switch app.yaml?
  • VB.net deserialize, JSON Conversion from type 'Dictionary(Of String,Object)' to type '
  • Benchmarking RAM performance - UWP and C#
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?
  • How can I remove ASP.NET Designer.cs files?
  • python draw pie shapes with colour filled
  • Is there any way to bind data to data.frame by some index?
  • How can i traverse a binary tree from right to left in java?
  • UserPrincipal.Current returns apppool on IIS
  • Unable to use reactive element in my shiny app
  • Net Present Value in Excel for Grouped Recurring CF