Skip to content

Commit

Permalink
Make recipe editable.
Browse files Browse the repository at this point in the history
  • Loading branch information
szmyd committed Aug 15, 2024
1 parent 9042b8d commit 9294bcd
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake
from conan.tools.files import copy
from os.path import join

required_conan_version = ">=1.60.0"

class HomeObjectConan(ConanFile):
name = "homeobject"
version = "2.0.10"
version = "2.0.11"

homepage = "https://github.com/eBay/HomeObject"
description = "Blob Store built on HomeReplication"
Expand All @@ -24,14 +24,12 @@ class HomeObjectConan(ConanFile):
"fPIC": ['True', 'False'],
"coverage": ['True', 'False'],
"sanitize": ['True', 'False'],
"testing": ['True', 'False'],
}
default_options = {
'shared': False,
'fPIC': True,
'coverage': False,
'sanitize': False,
'testing': True,
}

exports_sources = ("CMakeLists.txt", "cmake/*", "src/*", "LICENSE")
Expand Down Expand Up @@ -61,7 +59,20 @@ def validate(self):
check_min_cppstd(self, 20)

def layout(self):
cmake_layout(self)
self.folders.source = "."
self.folders.build = join("build", str(self.settings.build_type))
self.folders.generators = join(self.folders.build, "generators")

self.cpp.source.components["homestore"].includedirs = ["src/include"]
self.cpp.source.components["memory"].includedirs = ["src/include"]

self.cpp.build.components["homestore"].libdirs = ["src/lib/homestore_backend"]
self.cpp.build.components["memory"].libdirs = ["src/lib/memory_backend"]

self.cpp.package.components["homestore"].libs = ["homeobject_homestore"]
self.cpp.package.components["memory"].libs = ["homeobject_memory"]
self.cpp.package.includedirs = ["include"] # includedirs is already set to 'include' by
self.cpp.package.libdirs = ["lib"]

def generate(self):
# This generates "conan_toolchain.cmake" in self.generators_folder
Expand Down Expand Up @@ -102,11 +113,7 @@ def package(self):
copy(self, "*.h*", join(self.source_folder, "src", "include"), join(self.package_folder, "include"), keep_path=True)

def package_info(self):
self.cpp_info.names["cmake_find_package"] = "HomeObject"
self.cpp_info.names["cmake_find_package_multi"] = "HomeObject"
self.cpp_info.components["homestore"].libs = ["homeobject_homestore"]
self.cpp_info.components["homestore"].requires = ["homestore::homestore", "iomgr::iomgr", "sisl::sisl"]
self.cpp_info.components["memory"].libs = ["homeobject_memory"]
self.cpp_info.components["memory"].requires = ["sisl::sisl"]
self.cpp_info.components["homeobject"].requires = ["homestore"]

Expand All @@ -118,3 +125,6 @@ def package_info(self):
self.cpp_info.components["memory"].exelinkflags.append("-fsanitize=address")
self.cpp_info.components["memory"].sharedlinkflags.append("-fsanitize=undefined")
self.cpp_info.components["memory"].exelinkflags.append("-fsanitize=undefined")

self.cpp_info.names["cmake_find_package"] = "HomeObject"
self.cpp_info.names["cmake_find_package_multi"] = "HomeObject"

0 comments on commit 9294bcd

Please sign in to comment.