Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain
from conan.tools.files import collect_libs, copy

class WebuiConan(ConanFile):
name = "webui"
Expand All @@ -14,6 +15,7 @@ class WebuiConan(ConanFile):
default_options = {"tls": False, "shared": False}

generators = "CMakeDeps"
exports_sources = "src/*", "include/*", "bridge/*", "CMakeLists.txt"

def generate(self):
tc = CMakeToolchain(self)
Expand All @@ -26,6 +28,23 @@ def build(self):
cmake.configure()
cmake.build()

def package(self):
cmake = CMake(self)
cmake.install()

copy(self, pattern="LICENSE", dst=self.package_folder, src=self.source_folder)

def package_info(self):
self.cpp_info.libs = collect_libs(self)

if self.options.tls:
self.cpp_info.defines = ["WEBUI_TLS"]

if not self.options.shared:
self.cpp_info.system_libs = ["ws2_32" "user32" "shell32" "ole32"]
if self.settings.os == "Macos":
self.cpp_info.frameworks = ["Cocoa", "WebKit"]

def requirements(self):
self.tool_requires("cmake/[>=3.18.0]")

Expand Down
Loading