from conan import ConanFile
from conan.tools.files import copy
import os
class SMLConan(ConanFile):
name = "boost-sml"
version = "1.1.13"
description = "[Boost::ext].SML: C++14 State Machine Library"
url = "https://github.com/boost-ext/sml"
homepage = "https://github.com/boost-ext/sml"
license = "BSL-1.0"
package_type = "header-library"
exports_sources = (
"include/*",
"zephyr/*",
"LICENSE*",
)
no_copy_source = True
def package(self):
# Preserve upstream layout:
#
# package/
# ├── include/
# └── zephyr/
#
# This is important because the upstream Zephyr integration may
# refer to the include directory relative to zephyr/.
copy(
self,
"*",
src=os.path.join(self.source_folder, "include"),
dst=os.path.join(self.package_folder, "include"),
)
copy(
self,
"*",
src=os.path.join(self.source_folder, "zephyr"),
dst=os.path.join(self.package_folder, "zephyr"),
)
copy(
self,
"LICENSE*",
src=self.source_folder,
dst=os.path.join(self.package_folder, "licenses"),
)
def package_info(self):
self.cpp_info.includedirs = ["include"]
# Header-only: nothing to link.
self.cpp_info.libdirs = []
self.cpp_info.bindirs = []
# Convenient target when consumed through CMakeDeps.
self.cpp_info.set_property(
"cmake_file_name",
"boost-sml",
)
self.cpp_info.set_property(
"cmake_target_name",
"boost::sml",
)
Please update your conanfile: exg: