Questions tagged [find-package]
33 questions
0
votes
1 answer
Unable to use Zephyr header files
Greetings of the day!
I'm new to Zephyr and CMakeLists.txt I'm trying to include Zephyr header files in my project, so I downloaded Zephyr and keeping inside my project to include Zephyr to my project I used CMakeLists.txt in that I used a line like…

Ganesh R
- 1
0
votes
1 answer
Yocto: CMake Error (find_package) when trying to bitbake a Recipe, but when running it in Cmake alone it works
i am trying to run a simple program using the pigpio library on my raspberry pi, with the yocto project.
I have already tried out the build with cmake and when i run it in the terminal on my pc it works. But when i try to bitbake my recipe, i get…

Schwafi
- 3
- 1
0
votes
0 answers
CMAKE find_package successful, but TARGET not found
In my CMakeLists.txt file I’m trying to build “Bob”, which is a library that gets linked to later. The find_package request is successful, but the "if(NOT TARGET..." check fails. I figured if Bob was found then Bob::Bob would also be found. I could…

Kenny Cason
- 497
- 5
- 17
0
votes
0 answers
Automate VTK components generation at CMakeFiles.txt
I see there is a struggle with including a VTK to the C++ project and I wonder, if it can be done more elegant way. Routine work should be automated, right?
All examples I've found consist of two stages:
Include necessary vtk header files in the…

user7667996
- 1
- 1
0
votes
0 answers
cmake findPackage : compile package one after the other
I have a project with the actual structure, where Components are subdirectories :
CMakeList.txt
|
---Component1/CMakeList.txt
|
---Component2/CMakeList.txt
|
---Component3/CMakeList.txt
Component2 relies on many libraries from…

Sedji Aka
- 217
- 2
- 10
0
votes
0 answers
Is find_package(glog) not needed in cmake compiling?
I'm now trying to use glog in my project. By following the rules in google/glog, I designed a log system.
In the compiling stage, I wrote down my CMakeLists.txt as below:
cmake_minimum_required(VERSION 3.0.2)
project(glog_system)
…

RyanChen.YLC
- 57
- 7
0
votes
1 answer
Unable to link NLohmann json library using cmake
I am trying to link the NLohmann json library to my json interpreter via cmake.
I keep getting the error :
fatal error: 'nlohmann/json.hpp' file not found #include
From the file :
#include
#include…

callum arul
- 159
- 6
0
votes
1 answer
What's a simple straightforward find_package set of files for CMake
I'm new(ish) to CMake (meaning off and on over a few years I've been forced to use it even though it's something that's made me question my career path).
I have a folder with an include folder, and a lib folder containing .lib files and their…

Sean Michael McGhee
- 19
- 2
0
votes
0 answers
CMake find_package(...) not able to find wolfSSL
I have installed a wolfSSL version 5.4.0 in my ubuntu(configured to /usr/local (default)). I am trying to find the wolfSSL package using below find_package arguments in my project's root CMakeLists file but nothing worked.
find_package(wolfssl…

skumar
- 1
- 1
0
votes
0 answers
CMake cannot find Conan package "gRPC"
I have prepared a simple reproductive draft of my problem.
conanfile.txt:
[requires]
grpc/1.48.0
[generators]
cmake_paths
CMakeLists.txt:
CMAKE_MINIMUM_REQUIRED(VERSION 3.18.3)
PROJECT(GRPC_FIND_PACKAGE_TEST)
# Default values
IF(NOT…

montjet
- 525
- 1
- 4
- 13
0
votes
1 answer
How to copy soft link with target name in CMake
I'm using cmake to copy a soft link 'libbssl.so' (which has target libssl.so.3) to a build subdirectory.
COMMAND ${CMAKE_COMMAND} -E copy ${OPENSSL_SSL_LIBRARY} ${CMAKE_CURRENT_BINARY_DIR}/lib
The copy command works as expected and copies the file,…

user3071643
- 1,405
- 1
- 15
- 18
0
votes
1 answer
FindPython vs find_package(Python ....)
In CMake 3.12 the FindPython module was introduced to help find the Python interpreter and other components.
However, I continue to see many examples using find_package(Python ...).
Which should I use if I can guarantee I'm using CMake 3.12? What is…

BeeOnRope
- 60,350
- 16
- 207
- 386
0
votes
1 answer
find_package() ignores _ROOT
In my CMake script I append the path to a folder containing Config.cmake to _ROOT and then call find_package( REQUIRED) but it can't find my package.
When I use CMAKE_FIND_DEBUG_MODE I see my folder listed in…

Eyjafl
- 1,046
- 6
- 14
0
votes
1 answer
Finding Protobuf package with CMake
I cannot seem to get CMake to consistently find my protobuf package. I would like to include the protobuf source and build it as part of my project. I'm using protobuf 3.15.8 and protobuf-c 1.3.3 (useful as a control example).
This is the directory…

Coop
- 189
- 1
- 15
0
votes
1 answer
CMake - Install Find script for depencency together with script
I am making a CMake library around some installable SDK. So the dependency tree looks like:
Application --> MyLibrary --> OfficialSDK
This SDK is installed by some setup.exe and does not have a CMake module.
So instead I include a custom…

Roberto
- 958
- 13
- 33