Skip to content

About

A simple C++ project using the scons build-system together with the conan package manager

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conan package manager library integration with scons

This project is an example on how libraries built via the conan package manager with the cmake build-system could be integrated into a C++ program built using the scons build-system. It is part of a blog post of mine explaining how to use the scons build-system either manually with cmake built libraries and package managers such as vcpkg and conan.

Build requirements

  • Conan
  • Python
  • SCons
  • CMake
  • C++ compiler

Build instructions

  1. Create a conan profile (Conan tries to guess a build configuration)
conan profile detect --force

This will give out something like this depending on your system:

detect_api: Found apple-clang 16.0
detect_api: apple-clang>=13, using the major as version

Detected profile:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=16
os=Macos
  1. In the root directory, install the libraries specified by the conanfile.py file (here the fmt library). The --build argument specifies that only the packages whose binaries are not found will be built from source by Conan.
conan install . --output-folder=build --build=missing
  1. Call scons to compile the program into the executable helloworld
scons
  1. Run program (This may differ slightly on Windows)
./helloworld

About

A simple C++ project using the scons build-system together with the conan package manager

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages