Where is OpenGLConfig.cmake located on mac? - opengl

I'm using OpenGL with a C++ project. When I run configure in cmake-gui I get the following error:
CMake Error at CMakeLists.txt:18 (find_package):
Could not find a package configuration file provided by "OpenGL" with any
of the following names:
OpenGLConfig.cmake
opengl-config.cmake
Add the installation prefix of "OpenGL" to CMAKE_PREFIX_PATH or set
"OpenGL_DIR" to a directory containing one of the above files. If "OpenGL"
provides a separate development package or SDK, be sure it has been
installed.
Presumably, I have to set the OpenGL_DIR value but I can't find where OpenGLConfig.cmake file is located on mac.

Related

Why I can't build opencv WITH_QT?

I've installed Qt5.12 on my Windows 7 x64. And CMake 3.16.
I want to build OpenCV-4.1.2. So in cmake I've checked WITH_QT and specified QT5_DIR as: C:\\Qt\\5.12.6 and then I click Configure. But I get this error:
CMake Error at cmake/OpenCVFindLibsGUI.cmake:18 (find_package):
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.
Call Stack (most recent call first):
CMakeLists.txt:669 (include)"
I've finally figured it out: I've made a search inside the Qt directory for Qt5Config.cmake and found it in: "C:\Qt\5.12.6\msvc2017_64\lib\cmake\Qt5".
Now I specify this directory in CMake and click configure. Everything works fine. Thank you guys.

CMake Error at C:\Users\...\Desktop\imgwarp-opencv\imgwarp-opencv\src\CMakeLists.txt:2 (FIND_PACKAGE)

I am using Window 10, Visual Studio 2017. I have installed OpenCV properly and I can run some basic projects of C++ OpenCV that can be found around the internet.
I have also followed this video which shows How to Build Open Source Projects Using CMake and Visual Studio.
But, I can not run this project on my machine. I try File->Open->CMake to open the CMakeLists.txt which can be found in the downloaded repository, and I get this error:
CMake Error at C:\Users\Majid\Desktop\imgwarp-opencv\imgwarp-opencv\src\CMakeLists.txt:2 (FIND_PACKAGE):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.
Could not find a package configuration file provided by "OpenCV" with any
of the following names:
OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.
I think I must extract the downloaded opencv-4.0.1-vc14_vc15.exe file somewhere in the project folder and link the CMakeLists.txt file (which one?) to the OpenCVConfig.cmake which is in the extracted opencv. Or maybe not.
I have also CMake gui and if I should run it that way I will appreciate that you explain it that way instead of using Visual Studio File->Open->CMake. No matter how, any way that helps me run this project is welcome. Please explain it step by step.
In one line (forget all the above): What should I do to run this project properly?

Not found Eigen3_DIR when configuring a cmake project in Windows

I want to compile an open project, it needs Eigen3, I followed its guideline but stuck in this step:
"Set environment variable Eigen3_DIR to {YOUR_EIGEN3_DIRECTORY}/eigen3/cmake."
I have installed CMake gui and it printed following errors after configuration
Make Error at src/CMakeLists.txt:15 (find_package):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.
Could not find a package configuration file provided by "Eigen3" with any
of the following names:
Eigen3Config.cmake
eigen3-config.cmake
Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.
But I have downloaded Eigen3 from here, and set the Eigen3_DIR as follows
So what should I do to fix it? I am just a beginner in cmake.
I am assuming you are using Windows. You will need Visual Studio installed. You can use the community version. You will need to do the following:
Create a directory called "build" within your Eigen directory.
Go to the build directory and do "cmake ..". This will create Visual Studio projects.
Load the .sln using Visual Studio.
Build the solution.
Ensure that the project called INSTALL was built also.
This will create the Eigen3Config.cmake file in your install directory. In my case the install directory was "C:\Program Files(X86)\Eigen3. Use this to as the value for Eigen3_DIR variable.
By default Eigen does not come with the Eigen3Config.cmake file. You will see Eigen3Config.cmake.in file. This is used to build the Eigen3Config.cmake file.
HTH

OpenCV Environment variable changed

I had my standalone installation of OpenCV on my Linux machine and it was running OK. I installed ROS (comes with its OpenCV) and today I cannot run my CMakeLists.txt in any of my OpenCV projects, getting the error of :
CMake Error at CMakeLists.txt:20 (find_package):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.
Could not find a package configuration file provided by "OpenCV" with any
of the following names:
OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.
I am kinda sure this happened because some environment variable got changed however I don't know where to look at.
Could someone walk me through this?
Reinstalling OpenCV solved the problem for me, since it re-modified the Environment variable.

Installing QT in Centos - CMake Warning whike installing OpenBR

I am trying to install OpenBR in CentOS. The steps given here is for Ubuntu. Where as I need to install the OpenBR library in Centos. I am using "Centos-6.5" version.
The below is the step OpenBR team has asked to follow to install QT.
sudo apt-get install qt5-default libqt5svg5-dev qtcreator
What should I do to install the same in CentOS.
I followed the steps in this link to install QT.
When I give this command am getting the below error (I trimmed the error for easy view). What would be the issue?
CMake Warning at CMakeLists.txt:82 (find_package):
By not providing "FindQt5Concurrent.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5Concurrent", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Concurrent"
with any of the following names:
Qt5ConcurrentConfig.cmake
qt5concurrent-config.cmake
Add the installation prefix of "Qt5Concurrent" to CMAKE_PREFIX_PATH or set
"Qt5Concurrent_DIR" to a directory containing one of the above files. If
"Qt5Concurrent" provides a separate development package or SDK, be sure it
has been installed.
CMake Warning at CMakeLists.txt:82 (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.
CMake Warning at CMakeLists.txt:82 (find_package):
By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Gui", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Gui" with any
of the following names:
Qt5GuiConfig.cmake
qt5gui-config.cmake
Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set
"Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui"
provides a separate development package or SDK, be sure it has been
installed.
.
.
.
CMake Warning at 3rdparty/stasm4.0.0/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.
CMake Warning at 3rdparty/stasm4.0.0/CMakeLists.txt:18 (find_package):
By not providing "FindQt5Xml.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Xml", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Xml" with any
of the following names:
Qt5XmlConfig.cmake
qt5xml-config.cmake
Add the installation prefix of "Qt5Xml" to CMAKE_PREFIX_PATH or set
"Qt5Xml_DIR" to a directory containing one of the above files. If "Qt5Xml"
provides a separate development package or SDK, be sure it has been
installed.
CMake Error at 3rdparty/stasm4.0.0/CMakeLists.txt:41 (qt5_use_modules):
Unknown CMake command "qt5_use_modules".
-- Configuring incomplete, errors occurred!
See also "/home/raaa/Downloads/openbr/build/CMakeFiles/CMakeOutput.log".
You can get pre-built qt 5 packages for CentOS 6 from EPEL. First, install the EPEL repository:
sudo rpm -Uvh \
http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Then use yum to install the qtbase devel module, and any other modules you may want.
yum install qt5-qtbase-devel