Install fmtlib with Conan according to the official getting started guide: https://docs.conan.io/en/latest/getting_started.html#a-timer-using-poco-libraries
- Create projects directory
mkdir project && cd project
- Create your projects cpp files
touch main.cpp
- Create conanfile.txt
[requires]
fmt/5.2.0@bincrafters/stable
[generators]
cmake
- Create your CMakeLists.txt
project(ConanTest)
cmake_minimum_required(VERSION 3.12.0)
add_definitions("-std=c++11")
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
add_executable(main main.cpp)
target_link_libraries(main ${CONAN_LIBS})
- Setup build directory
mkdir build && cd build
- Install Conan dependencies
conan install ..
- Build missing depenencies If depencies are not available in the official repository, they need to be build.
conan install --build missing ..
- Building the project
ccmake ..
cmake --build .
- Run the executable