From 2a3ebf903dc05b83168c3afdb747631b51b5bb34 Mon Sep 17 00:00:00 2001 From: Brian Szmyd Date: Wed, 14 Aug 2024 13:14:26 -0600 Subject: [PATCH] Make Homestore editable. (#476) --- CMakeLists.txt | 4 ++-- conanfile.py | 24 +++++++++++++++++------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 521aaa081..9487a2419 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,8 @@ enable_testing() include (cmake/test_mode.cmake) -if (DEFINED CONAN_BUILD_COVERAGE) - if (${CONAN_BUILD_COVERAGE}) +if (DEFINED BUILD_COVERAGE) + if (${BUILD_COVERAGE}) include (cmake/CodeCoverage.cmake) APPEND_COVERAGE_COMPILER_FLAGS() SETUP_TARGET_FOR_COVERAGE_GCOVR_XML(NAME coverage EXECUTABLE ctest DEPENDENCIES ) diff --git a/conanfile.py b/conanfile.py index 83f75c3e6..0250e334f 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,7 +1,7 @@ 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 @@ -9,7 +9,8 @@ class HomestoreConan(ConanFile): name = "homestore" - version = "6.4.44" + version = "6.4.45" + homepage = "https://github.com/eBay/Homestore" description = "HomeStore Storage Engine" topics = ("ebay", "nublox") @@ -63,7 +64,20 @@ def imports(self): self.copy(root_package="sisl", pattern="*", dst="bin/scripts/python/flip/", src="bindings/flip/python/", keep_path=False) 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.includedirs = ["src/include"] + + self.cpp.build.libdirs = ["src"] + + self.cpp.package.libs = ["homestore"] + self.cpp.package.includedirs = ["include"] # includedirs is already set to 'include' by + self.cpp.package.libdirs = ["lib"] + + if not self.settings.arch in ['x86', 'x86_64']: + self.cpp.package.defines.append("NO_ISAL") def generate(self): # This generates "conan_toolchain.cmake" in self.generators_folder @@ -104,10 +118,6 @@ def package(self): copy(self, "*.dll", self.build_folder, join(self.package_folder, "lib"), keep_path=False) def package_info(self): - self.cpp_info.libs = ["homestore"] - if not self.settings.arch in ['x86', 'x86_64']: - self.cpp_info.defines.append("NO_ISAL") - if self.options.sanitize: self.cpp_info.sharedlinkflags.append("-fsanitize=address") self.cpp_info.exelinkflags.append("-fsanitize=address")