I'm trying to build the latest nheko release (0.8.1) on Devuan Beowulf (with a self-built Boost 1.73.0).
I get stuck during CMake configuration, when it says:
By not providing "FindMatrixClient.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"MatrixClient", but CMake did not find one.
Could not find a package configuration file provided by "MatrixClient"
(requested version 0.4.1) with any of the following names:
I thought nheko is a Matrix client. What exactly does nheko want from me here?
MatrixClient refers to this repository: https://github.com/Nheko-Reborn/mtxclient
It's the library Nheko uses to communicate with Matrix servers.
You can use the bundled version using -DUSE_BUNDLED_MTXCLIENT=ON, which will not require the lib to be installed separately.
Related
I am migrating a package from ROS1 to ROS2. It is a motor controller driver so it communicates over USB and uses the 'serial' C++ library. I have seen other ROS2 C++ drivers similar to this one use the serial library, but am wondering how to fix this error when building:
CMake Error at CMakeLists.txt:26 (find_package):
By not providing "Findserial.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "serial", but
CMake did not find one.
Could not find a package configuration file provided by "serial" with any
of the following names:
serialConfig.cmake
serial-config.cmake
Add the installation prefix of "serial" to CMAKE_PREFIX_PATH or set
"serial_DIR" to a directory containing one of the above files. If "serial"
provides a separate development package or SDK, be sure it has been
installed.
---
Failed <<<
I include the header #include <serial/serial.h> In my file and find_package(serial REQUIRED) in CMakeLists.txt. Is there something I'm missing for this to work? This is on a fresh install, do I need to install anything? Thanks
In ROS1, you can simply use apt-get install ros-noetic-serial. This doesn't work on ROS2. When I run colcon build, I got the error above.
I write a library that is built with Visual Studio (msbuild).
I distribute binaries only of the library via vcpkg (I use a private vcpkg registry. The portfile.cmake for the port simply downloads a zip file of the binaries and headers and places them in the vcpkg install tree).
I have a client that is using CMake.
I can integrate vcpkg (manifest mode) into CMake and find_package() finds vcpkg ports except for mine.
I've arrived at the point that I think I need to distribute either a CMake config (<my-package>-config.cmake) or a CMake find module (Find<my-package>.cmake).
All of the books I've read for CMake seem to assume that you can easily export your CMake targets to create a CMake config. Since I don't build my library with CMake I'm not sure how to get a Targets.cmake.
The documentation I'm reading on CMake find modules begins discussing resolving dependencies using CMakeFindDependencyMacro and find_dependency() but vcpkg also manages dependencies (this was the whole reason I distributed my library via vcpkg).
What's the solution here; CMake config or find module?
How does one write either if the project is not built with CMake?
I am following chapter-02/recipe-06 in "CMake Cookbook". This particular example requires the Eigen C++ libraries.
I attempted to build the example and got the error that Eigen was not found.
CMake Error at CMakeLists.txt:9 (find_package):
Could not find a package configuration file provided by "Eigen3" (requested
version 3.3) 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.
This was expected because the library was not installed on my system.
I then downloaded the ".zip" file for the Eigen libraries and unzipped it to an arbitrary location outside of my project. I created a "build" folder in the Eigen directory and ran cmake .. in the "build" folder. (I only ran cmake - I did NOT build or install the package.)
After running CMake on the Eigen build directory, I went back to the example code for "recipe-06" and it was magically able to find the Eigen library and built successfully even though Eigen was never built or installed.
Somehow just running CMake in the Eigen project made CMake aware of the Eigen libraries location. After doing this, any projects that do find_package to find Eigen3 somehow get the ${Eigen3_DIR} variable defined and are able to find it.
Looking at the CMake documentation for find_package I don't see any explanation of why this works. Eigen is not in any of the typical locations that find_package searches. According to the documentation it looks like it should NOT be found.
Even more interesting - it doesn't matter where I put Eigen on my system. I can put it literally anywhere and it will still find it.
According to everything I see in the documentation it should not be found... but it is found. So the question is how? Why does this work?
Additional info: I am using CMake version 3.13.3
There are 2 "origins" of XXXConfig.cmake files, used internally by find_package() call.
Usually, XXXConfig.cmake file is produced when the project is installed, and the file contains information about installed libraries and headers.
But CMake provides also an export() command, which allows to export build tree.
export(PACKAGE <name>)
Store the current build directory in the CMake user package registry for package <name>. The find_package command may consider the directory while searching for package <name>.
Eigen's CMakeLists.txt uses export() command, so the project becomes detectable with find_package just after running cmake for Eigen.
CETUS is an open challenge on 3D echocardiography Segmentation. The goal is to segment some part of the volume of data provided for the challenge. To measure how successful you have been on segmentation, a package is provided by the challenge which needs VTK (Visualization Toolkit) to be contained in the project to be built.
I downloaded VTK-8.1.1 and compiled it using cmake and visual studio 12 and added the path project_directory/bin/release/ to windows 7 path environment variable.
When I try to configure challenge measurement project by cmake, it returns an error:
CMake Error at CMakeLists.txt:30 (FIND_PACKAGE):
By not providing "FindVTK.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "VTK", but
CMake did not find one.
Could not find a package configuration file provided by "VTK" with any of
the following names:
VTKConfig.cmake
vtk-config.cmake
Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
to a directory containing one of the above files. If "VTK" provides a
separate development package or SDK, be sure it has been installed.
Configuring incomplete, errors occurred!
See also "C:/Users/MJ/Desktop/EvaluationMetrics/EvaluationMetrics/build_dir/CMakeFiles/CMakeOutput.log".
I don't know whether I should modify configurations in cmake for VTK, or perhaps the VTK I've downloaded is not a full version!
Can anyone help me to build measurement metrics project?
I am trying to cross compile an application for a different platform (quark processor) using cmake. The platform has provided an SDK to me. My application requires a newer version of one of the libraries in the SDK. I have added the new source code for the library using add_subdirectory(). But my problem is when I use target_link_libraries(), cmake is linking the older version of the library in my SDK. How to enable cmake ignore the library version in the SDK sysroot, and only use the new library version present in the subdirectory?
Edit: My apologies for the initial lack of details.Adding more details to the question as suggested.
My CMakeLists.txt include the following statements
add_subdirectory(libs/mosquitto-1.4.10)
target_link_libraries(myapp mosquittopp)
As mentioned, my problem is that the SDK I am using contains a 1.4 version of mosquitto library. The target_link_libraries() only links the 1.4 version and not the newer 1.4.10 version, even though cmake successfully builds the 1.4.10 version.