-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Add Conan package #276
Labels
help wanted
Extra attention is needed
Comments
Good idea 👍 |
I started the package using Conan v1 and I'm not sure if I should migrate to v2... also seems that conanfile.py from conans import ConanFile, AutoToolsBuildEnvironment
from conans import tools
class WebuiConan(ConanFile):
name = "webui"
version = "2.4.2"
license = "MIT License"
url = "<https://github.com/webui-dev/webui, https://github.com/webui-dev/webui/issues>"
description = "<Use any web browser as GUI, with your preferred language in the backend and HTML5 in the frontend, all in a lightweight portable lib.>"
settings = "os", "compiler", "build_type", "arch"
exports_sources = "src/*", "include/*", "bridge/webui_bridge.h", "Makefile", "GNUmakefile"
generators = "make"
def build(self):
autotools = AutoToolsBuildEnvironment(self)
if self.settings.os == "Windows":
# `nmake` or `mingw32-make` on Windows
if self.settings.compiler == "gcc":
autotools.make(args=["-f", "Makefile"], make_program="mingw32-make")
elif self.settings.compiler == "Visual Studio":
autotools.make(args=["-f", "Makefile"], make_program="nmake")
else:
# Default to 'make' on Linux and macOS
autotools.make(args=["-f", "Makefile"])
def package(self):
self.copy("*.h", dst="include", src="include")
self.copy("webui_bridge.h", dst="bridge", src="bridge")
self.copy("*webui-2*.dll", dst="bin", keep_path=False)
self.copy("*webui-2*.so", dst="bin", keep_path=False)
self.copy("*webui-2*.dynlib", dst="bin", keep_path=False)
self.copy("*webui-2-static.lib", dst="lib", keep_path=False)
self.copy("*libwebui-2-static.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = tools.collect_libs(self) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be much easier to use conan in C/C++ environment through package
The text was updated successfully, but these errors were encountered: