Skip to content

Commit

Permalink
Cxx: Move conan files to the top level.
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
agdavydov81 committed Nov 11, 2023
1 parent 4794b0a commit 2cdebba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
File renamed without changes.
8 changes: 5 additions & 3 deletions native/conanfile.py → conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ class DfpConan(ConanFile):
default_options = {"shared": False}

# Sources are located in the same place as this recipe, copy them to the recipe
exports_sources = "CMakeLists.txt", "src/*", "include/*"
exports_sources = "LICENSE", "intel-eula.txt", "native/CMakeLists.txt", "native/src/*", "native/include/*"

def set_version(self):
# Command line ``--version=xxxx`` will be assigned first to self.version and have priority
self.version = self.version or load_version(os.path.join(self.recipe_folder, "..", "gradle.properties"))
self.version = self.version or load_version(os.path.join(self.recipe_folder, "gradle.properties"))

def configure(self):
# it's a C library
self.settings.rm_safe("compiler.libcxx")
self.settings.rm_safe("compiler.cppstd")

def layout(self):
cmake_layout(self)
cmake_layout(self, src_folder="native")

def generate(self):
deps = CMakeDeps(self)
Expand All @@ -63,6 +63,8 @@ def build(self):
cmake.build()

def package(self):
copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, ".."))
copy(self, "intel-eula.txt", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, ".."))
cmake = CMake(self)
cmake.install()

Expand Down

0 comments on commit 2cdebba

Please sign in to comment.