Skip to content

Commit

Permalink
nativefiledialog: use gtk/system for now
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Jul 15, 2024
1 parent de571b4 commit a350437
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions recipes/nativefiledialog/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def layout(self):

def requirements(self):
if self.settings.os in ["Linux", "FreeBSD"]:
self.requires("gtk/3.24.37")
# Using system GTK since the Conan version is not v2 compatible
self.requires("gtk/system", options={"version": 3})

def validate(self):
if self.settings.arch not in ["x86", "x86_64"]:
Expand Down Expand Up @@ -112,24 +113,15 @@ def _lib_name(self):
return "nfd" + suffix

def package(self):
copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, "*nfd.h",
dst=os.path.join(self.package_folder, "include"),
src=self.source_folder,
keep_path=False)

copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
copy(self, "*nfd.h", self.source_folder, os.path.join(self.package_folder, "include"), keep_path=False)
if is_msvc(self):
copy(self, f"*{self._lib_name}.lib",
dst=os.path.join(self.package_folder, "lib"),
src=self.source_folder,
keep_path=False)
copy(self, f"*{self._lib_name}.lib", self.source_folder, os.path.join(self.package_folder, "lib"), keep_path=False)
else:
copy(self, f"*{self._lib_name}.a",
dst=os.path.join(self.package_folder, "lib"),
src=self.source_folder,
keep_path=False)
copy(self, f"*{self._lib_name}.a", self.source_folder, os.path.join(self.package_folder, "lib"), keep_path=False)

def package_info(self):
self.cpp_info.libs = [self._lib_name]
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.requires = ["gtk::gtk+-3.0"]
# FIXME: uncomment once non-system GTK is available
# if self.settings.os in ["Linux", "FreeBSD"]:
# self.cpp_info.requires = ["gtk::gtk+-3.0"]

0 comments on commit a350437

Please sign in to comment.