Skip to content

Demonstrates a use case where two Conan packages use the `cmake_find_package` generator to create unique find modules which create exported targets beloning to the same namespace

Notifications You must be signed in to change notification settings

TimSimpson/conan-pkgs-with-shared-cmake-namespace-recreate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conan Pkgs with Shared CMake Namespace Recreate

This models a use case where multiple C++ packages export CMake targets which share a namespace. An example would be the vcpkg's for SDL2 and SDL2-image, which both export CMake targets starting with "SDL2::".

Here all the projects use the namespace ACME::[name]. To make things more confusing, you include them from CMake by calling find_package(acme-[name]). This models real life where everyone likes to make things as inconsistent as possible when naming things.

Weird Requirements

This currently supports the use of an attribute self.cpp.filenames['cmake_find_package'] which is not in Conan trunk. See here.

Usage

Run the Conan test package workflow on A, in the process exporting it to your local cache, then do it for B.

If you want something more specific of don't know the common Conan idioms like the back of your hand, I personally use this repo and then just run

git clone https://github.com/TimSimpson/ci-land
set PROFILE=clang-8-d-static
pushd a
../ci-land/cil conan package all
popd
pushd b
../ci-land/cil conan package all

About

Demonstrates a use case where two Conan packages use the `cmake_find_package` generator to create unique find modules which create exported targets beloning to the same namespace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published