Skip to content

Commit

Permalink
Merge pull request #3 from outpost-os/exclude-prebuilts
Browse files Browse the repository at this point in the history
conan,pkg: removing prebuilt and deploy src
  • Loading branch information
pthierry-ledger authored Jan 16, 2025
2 parents ea3251e + 34c71a6 commit ee7ea81
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,25 @@ def layout(self):
_os = str(self.settings.os).lower()
_arch = str(self.settings.arch).lower()
self.folders.build = os.path.join("output", "staging")
self.folders.source = self.folders.build
self.folders.source = os.path.join("output", "src")
self.cpp.source.includedirs = ["usr/local/include"]
self.cpp.build.libdirs = ["usr/local/lib"]
self.cpp.build.bindirs = ["usr/local/bin"]
self.cpp_info.resdirs = ["usr/local/share"]
self.cpp_info.srcdirs = ["."]

def package(self):
local_include_folder = os.path.join(self.source_folder, self.cpp.source.includedirs[0])
local_lib_folder = os.path.join(self.build_folder, self.cpp.build.libdirs[0])
local_bin_folder = os.path.join(self.build_folder, self.cpp.build.bindirs[0])
local_res_folder = os.path.join(self.build_folder, self.cpp_info.resdirs[0])
local_src_folder = os.path.join(self.source_folder, self.cpp_info.srcdirs[0])
copy(self, "*.h", local_include_folder, os.path.join(self.package_folder, "include"), keep_path=False)
copy(self, "*.a", local_lib_folder, os.path.join(self.package_folder, "lib"), keep_path=False)
copy(self, "*.pc", local_lib_folder, os.path.join(self.package_folder, "lib"), keep_path=True)
copy(self, "*.elf", local_bin_folder, os.path.join(self.package_folder, "bin"), keep_path=False)
copy(self, "*.hex", local_bin_folder, os.path.join(self.package_folder, "bin"), keep_path=False)
copy(self, "*.bin", local_bin_folder, os.path.join(self.package_folder, "bin"), keep_path=False)
copy(self, "*", local_bin_folder, os.path.join(self.package_folder, "bin"), keep_path=False, excludes=["*.bin","*.hex","*.elf"])
copy(self, "*", local_res_folder, os.path.join(self.package_folder, "share"), keep_path=True)
copy(self, "*", local_src_folder, os.path.join(self.package_folder, "src"), keep_path=True)

def package_info(self):
self.cpp_info.libs = ["uapi", "shield_c_lib"]
Expand Down

0 comments on commit ee7ea81

Please sign in to comment.