How to select library when external dependency provides multiple #11298
-
In my project I use catch2, version 3.
This library is built in two versions: with main, and without main.
Meson builds both, but links my executable with libCatch2.a by default. I want to link with libCatch2Main.a. How can I instruct Meson to pick the other one? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
More info on how this is done in CMake, in case it would be somehow helpful: https://github.com/catchorg/Catch2/blob/devel/docs/cmake-integration.md
|
Beta Was this translation helpful? Give feedback.
-
Catch2 provides a catch2-with-main.pc, so try |
Beta Was this translation helpful? Give feedback.
-
It works. Thank you. |
Beta Was this translation helpful? Give feedback.
Catch2 provides a catch2-with-main.pc, so try
dependency('catch2-with-main')
.