Skip to content

Commit

Permalink
gdal: fix gdal data not being packaged
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 22, 2023
1 parent 578a4e2 commit 6fc3871
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions recipes/gdal/post_3.5.0/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,12 +620,15 @@ def build(self):
cmake.build()

def package(self):
copy(self, "LICENSE.TXT", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, "LICENSE.TXT", self.source_folder, os.path.join(self.package_folder, "licenses"))
cmake = CMake(self)
cmake.install()
rmdir(self, os.path.join(self.package_folder, "share"))
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
os.rename(os.path.join(self.package_folder, "share"),
os.path.join(self.package_folder, "res"))
rmdir(self, os.path.join(self.package_folder, "res", "bash-completion"))
rmdir(self, os.path.join(self.package_folder, "res", "man"))

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "GDAL")
Expand All @@ -640,6 +643,7 @@ def package_info(self):
if self.settings.build_type == "Debug":
libname += "d"
self.cpp_info.libs = [libname]
self.cpp_info.resdirs = ["res"]

self.cpp_info.requires.extend(["json-c::json-c"])
self.cpp_info.requires.extend(["libgeotiff::libgeotiff"])
Expand Down

0 comments on commit 6fc3871

Please sign in to comment.