webui
webui copied to clipboard
conan: experimental package support
So, this adds the talked about package support for conan and in theory this should work. However, when I tried using the package it spit out linker errors (tried with tls=True and shared=True, it couldn't find the used functions). I'm not an expert in conan packaging so maybe the package itself is fine and I did something wrong.
I tried it using the following commands (files below):
conan create .(in webui repo, everything else in the test folder)conan install . --build="webui/2.5.0-beta.4" -of conancmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=conan/conan_toolchain.cmakecmake --build build
main.c:
#include <webui.h>
int main() {
size_t my_window = webui_new_window();
webui_show(my_window, "<html><head><script src=\"webui.js\"></script></head> Hello World ! </html>");
webui_wait();
return 0;
}
CMakeLists.txt:
cmake_minimum_required(VERSION 3.15)
project(Test)
add_executable(Test
main.c)
find_package(webui REQUIRED)
include_directories(${webui_INCLUDE_DIRS})
target_link_libraries(Test
PUBLIC webui::webui)
install(TARGETS Test)
conanfile.txt:
[requires]
webui/2.5.0-beta.4
[generators]
CMakeToolchain
CMakeDeps
[options]
webui/*:shared=True
webui/*:tls=True