[[TOC]]
This illustrates what a Mdt library should do
so that the user can use the CMake find_package()
component syntax:
find_package(Mdt0 REQUIRED COMPONENTS PlainText)
The library should depend on MdtCMakeConfig
:
[requires]
mdtcmakeconfig/0.x.y@scandyna/testing
The user project will then use the library:
[requires]
mdtplaintext/0.x.y@scandyna/testing
The library should depend on MdtCMakeConfig
:
sudo apt-get install mdt0plaintext
# Will also install mdt0cmakeconfig
Note: Debian package is not implemented yet
See BUILD.
To create Conan packages that support find_package
COMPONENTS syntax
with the new Conan generators is discussed in Split Qt packages.
There are also some issues about that:
- CMake find_package() COMPONENTS syntax across Conan packages #11495
- CMakeDeps generator: merge cpp_info of different recipes if common cmake_file_name #10229
Here are some thought about usage without a package manager.
Here are also some other discussions about Mdt.