The most important file required for all Conan packages is conanfile.py. In our case, we'll want to fill in some of its details using CMake variables, so let's create a conanfile.py.in file instead. We'll use it to create the former file by adding the following to our CMakeLists.txt files:
configure_file(${PROJECT_SOURCE_DIR}/conan/conanfile.py.in
${CMAKE_CURRENT_BINARY_DIR}/conan/conanfile.py @ONLY)
Our file will begin with some boring Python imports, such as those required by Conan for CMake projects:
import os
from conans import ConanFile, CMake
Now we need to create a class that defines our package:
class CustomerConan(ConanFile):
name = "customer"
version = "@PROJECT_VERSION@"
license = "MIT"
author = "Authors"
description = "Library and app for the Customer microservice"
topics = ("Customer", "domifair")
First, we start with...