Questions tagged [find-package]

33 questions
4
votes
2 answers

How to Capture multiple screen screenshot in flutter desktop?

I am looking for a way or package that can help me to capture multiple screen. I have been through some packages that supports single fullscreen screenshot but I want to capture all the screens connected.
MANISH DAYMA
  • 1,126
  • 3
  • 18
3
votes
1 answer

Under what conditions does find_package() print a message?

The CMake find_package() command sometimes prints a message, indication that the package has been found, and possibly the found version. What are the condition(s) for this message being printed, other than QUIET not being used? Note: Asking about…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
2 answers

Using a package with add_subdirectory vs find_package

I am troubleshooting a build on a C++ codebase which uses cmake. The codebase has several popular 3rd party packages which are embedded directly in the source tree. For one package (say foo) a find_package call fails as it could not find the…
Agnel Kurian
  • 57,975
  • 43
  • 146
  • 217
1
vote
1 answer

Catch2 found by cmake but not accepted due to version mismatch

I installed Catch2 on Windows, located in C:/Program Files (x86)/Catch2/, but something went wrong when I use find_package to use Catch2. In detail, using this cmake file: project(UnitTest) cmake_minimum_required(VERSION 3.20) set(CMAKE_CXX_STANDARD…
Gorun
  • 134
  • 6
1
vote
2 answers

Can I get find_package to report what it found?

When we initially configure using CMake, we get some messages about some of our find_package() instructions, e.g.: -- Found CUDAToolkit: /usr/local/cuda/include (found suitable version "12.0.140", minimum required is "10.1") or: -- Found Python:…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
1
vote
0 answers

Submodule tries to find a package which is not installed but rather another submodule

I'm trying to configure a CMake project which uses the git submodule https://github.com/hungpham2511/toppra. That submodule requires the Eigen3 library to work, so in its CMakeLists.txt there is find_package (Eigen3 REQUIRED). I could simply install…
maxpla3
  • 13
  • 3
1
vote
1 answer

CMake: find_package(..) does not search subdirectories

I try to find a package (SDL2 and SDL2_image) I know exists and is installed in a custom directory. Since I am on Linux it should search all of these subdirectories, but it just does not and I see no reason…
SkryptX
  • 813
  • 1
  • 9
  • 24
1
vote
1 answer

CMake link library from find_package with system lib in wrong order

my CMakeLists.txt is as follows find_pacakge(something) add_executable(exe main.cc) # libsomething depends on dlopen/dlsym... so I have to add dl here target_link_libraries(run PRIVATE something::something dl) results: g++ -o exe -ldl…
Bigcat
  • 100
  • 5
1
vote
0 answers

Cmake ERROR with find_package not comparing version correctly

Hello I'm trying to get a C++ project to run with cmake but when building I always get an error on this line: find_package(jsoncpp REQUIRED) the error being: [cmake] CMake Error at src/scouting/CMakeLists.txt:12 (find_package): [cmake] Could not…
Konny
  • 19
  • 2
1
vote
1 answer

CMake find_package for another library in same project

I want to make a builder project that checks out sub-modules and builds them as a group, and I would like to build them in a single pass. builder submod1 submod2 #depends on submod1 submod3 #depends on submod2 For testing I downloaded…
Sir Demios
  • 83
  • 11
1
vote
1 answer

CMake - Build only listed Boost libraries in find_package

I am trying to install boost using cmake for my project. From a little study I found that one of the recommended ways to install boost libraries is to use the cmake command find_package (How do you add Boost libraries in CMakeLists.txt?). Below is…
Optimus Prime
  • 409
  • 7
  • 15
1
vote
2 answers

bazel connect find_package from cmake

I'm trying to use bazel's cmake from rules_foreign_cc to build a library called fcl. That package has, in it's CMakeLists.txt, a find_package(ccd QUIET) statement. It wants to find the ccd (or libccd) package. I build that package as well, but just…
Colin
  • 3,670
  • 1
  • 25
  • 36
0
votes
1 answer

How to check for available HDF5 options in CMake?

I'm using CMake to configure a project including HDF5 support. I can detect whether HDF5 is installed using find_package(HDF5 ...). According to the CMake manual entry, the find_package call will set a few more variables, e.g.,…
Dominic
  • 452
  • 4
  • 20
0
votes
1 answer

How to check an OPTIONAL_COMPONENT using find_package in cmake?

I want to build a specific feature of a GUI only if a certain component of a package is found. If not, the GUI should be built either way, but without this feature. The idea would be something like this, but I don't know the correct notation (or…
AcKoucher
  • 35
  • 5
0
votes
1 answer

CMake find_package built from source

I'm running a CMake script to build a tool on a SUSE machine where I dont have admin rights. All my libraries / packages are built from source or extracted from RPMs as prebuilt binaries. In my CMake script, there is a line searching for a package…
1
2 3