Installing QT in Centos - CMake Warning whike installing OpenBR - c++

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

Related

Could not find a package configuration file provided by "absl" with any of the following names: abslConfig.cmake absl-config.cmake

Trying to run the Google cpu checker:
https://github.com/google/cpu-check
I get the following error when running cmake .. in the "Building" section:
CMake Error at CMakeLists.txt:86 (find_package):
By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "absl", but
CMake did not find one.
Could not find a package configuration file provided by "absl" with any of
the following names:
abslConfig.cmake
absl-config.cmake
Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or set
"absl_DIR" to a directory containing one of the above files. If "absl"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!

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.

How to configure cmake-based project for a build with Qt

here is a doc about that, but it doesn't look correct for me ,
so I've copied cmake instructions into my cmakelists.txt and it doesn't work.
it's clear why it doesn't work - because there is no one instruction how to search qt:
I suppose two cases:
some additional cmake instructions requires to set
some environment variables should be set
but nothing about that.
the instruction :
find_package(Qt5Widgets)
refers to extra cmake script from qt kit , isn't it?
I see the directory with that name (annd contains *.cmake scripts but another names) but there is no the script with this name
these are the only .cmake files with qt in names in cmake 3.6 :
cmake-3.6\Modules\DeployQt4.cmake
cmake-3.6\Modules\FindosgQt.cmake
cmake-3.6\Modules\FindQt.cmake
cmake-3.6\Modules\FindQt3.cmake
cmake-3.6\Modules\FindQt4.cmake
cmake-3.6\Modules\Qt4ConfigDependentSettings.cmake
cmake-3.6\Modules\Qt4Macros.cmake
cmake-3.6\Modules\UseQt4.cmake
===================
C:\dev\tools\CLion.RC\bin\cmake\bin\cmake.exe -DCMAKE_BUILD_TYPE=Debug
-G "CodeBlocks - MinGW Makefiles" C:\dev\workspace\algolist.v2 CMake Warning at CMakeLists.txt:14 (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 Error at CMakeLists.txt:20 (target_link_libraries): Cannot
specify link libraries for target "helloworld" which is not built by
this project.
-- Configuring incomplete, errors occurred! See also "C:/dev/workspace/algolist.v2/cmake-build-debug/CMakeFiles/CMakeOutput.log".
seems it found Qt5Widgets, but absolutely not clear how it does this...
so it looks for cmake files inside Qt5Widgets folder, in Qt kit.
I can add this folder to the path but I don't think this is a valid way,
because there is a lot of subfolders with cmake files
Qt5.8 beta, built with MinGW, Win10, cmake 3.6
You need to use CMAKE_PREFIX_PATH.
For example:
cmake.exe -DCMAKE_PREFIX_PATH="C:/path/to/Qt/5.X/compiler/lib/cmake"

CMake Error at CMakeLists.txt:3 (find_package)

I'm trying to control raspberry pi camera via c++. I found api (raspicam), installed, checked. It works with an example provided by developer. Now I create my own project and got an error of CMakeLists:
CMake Error at CMakeLists.txt:3 (find_package):
By not providing "Findraspicam.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "raspicam",
but CMake did not find one.
Could not find a package configuration file provided by "raspicam" with any
of the following names:
raspicamConfig.cmake
raspicam-config.cmake
Add the installation prefix of "raspicam" to CMAKE_PREFIX_PATH or set
"raspicam_DIR" to a directory containing one of the above files. If
"raspicam" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "/home/pi/raspicam/build/CMakeFiles/CMakeOutput.log".
And it is my CmakeLists.txt file:
make_minimum_required (VERSION 2.8)
project (raspicam_test)
find_package(raspicam REQUIRED)
add_executable (simpletest_raspicam simpletest_raspicam.cpp)
target_link_libraries (simpletest_raspicam ${raspicam_LIBS})
I just have started and already got a problem... Could you help please guys? :/
For those who used default instructions in the readme file of the raspicam (as of v 0.1.3, might differ in future):
you can also add
set(raspicam_DIR "/usr/local/lib/cmake")
to your cmake file before you use
find_package(raspicam REQUIRED)
That is when you have raspicamConfig.cmake at /usr/local/lib/cmake. If you did not have it at that directory, you can simply search your raspberry to find where it is or you can go to "build" folder in raspicam you used to install before. Then type sudo make install again, which will return "Up-to-date" message along with all a list of files and their locations, including raspicamConfig.cmake. Hope this helps to some.
This works for me.
$ brew install vcpkg
$ vcpkg install raspicam
$ vcpkg integrate install # get path
$ cmake -DCMAKE_TOOLCHAIN_FILE=/usr/local/Cellar/vcpkg/2021.05.12/libexec/scripts/buildsystems/vcpkg.cmake ..

Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH

I don't know a lot about cmake, I'm trying to build a client using cmake and Qt. Getting the following error:
CMake Error at alethzero/CMakeLists.txt:26 (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.
-- Configuring incomplete, errors occurred!
As far as I understand, I need to add the QT path to CMake. How do I do it? I have Qt installed in /home/user/Programs. All the explanations I find are "just do this or that". I need the exact Terminal commands so I can just learn how to do it in the future.
Thanks!
UPDATE: export CMAKE_PREFIX_PATH=/home/user/Programs did not help me.
Well, here you have a solution for Windows: How to find qt5 CMake module on windows
set (CMAKE_PREFIX_PATH "C:\\Qt\\Qt5.0.1\\5.0.1\\msvc2010\\")
For your environment, I think you will have to change the path where Qt is located...
Maybe this will help you:
https://github.com/Cockatrice/Cockatrice/issues/205
This is documented:
http://doc.qt.io/qt-5/cmake-manual.html
The easiest way to use CMake is to set the CMAKE_PREFIX_PATH
environment variable to the install prefix of Qt 5
Do this
export CMAKE_PREFIX_PATH=/home/user/Programs/<other_stuff>
where references the compiler etc, so that this complete path is valid:
/home/user/Programs/<other_stuff>/bin/qmake*
I needed this on my macOS after Qt installation with brew install qt5:
export CMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.7.0/
For ubuntu:
cmake -DCMAKE_PREFIX_PATH=/home/ryan/Qt/5.11.2/gcc_64 ..
/home/ryan/Qt/ is the Qt installation root path
at an Ubuntu 16.04.4 LTS desktop the solution was
cmake .. -DMAKE_PREFIX_PATH=/usr/include/x86_64-linux-gnu/qt5