Commit ec34ac02 authored by lukas's avatar lukas

fix Linux/Windows compatibility build issues

add github build workflow
parent 1f9b1971
name: build conan package
on: push
jobs:
build_conan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# install dependencies
- name: dependencies
run: |
sudo apt-get update
sudo apt-get install -yq python3 python3-pip python3-setuptools build-essential cmake make
sudo pip3 install conan
# build project
- name: build conan package
run: conan create .
\ No newline at end of file
...@@ -56,13 +56,13 @@ class LibconfigConan(ConanFile): ...@@ -56,13 +56,13 @@ class LibconfigConan(ConanFile):
def package_info(self): def package_info(self):
# FIXME: `libconfig` is `libconfig::libconfig` in `libconfigConfig.cmake` # FIXME: `libconfig` is `libconfig::libconfig` in `libconfigConfig.cmake`
# FIXME: `libconfig++` is `libconfig::libconfig++` in `libconfig++Config.cmake` # FIXME: `libconfig++` is `libconfig::libconfig++` in `libconfig++Config.cmake`
self.cpp_info.components["libconfig_c"].libs = ["libconfig"] self.cpp_info.components["libconfig_c"].libs = ["libconfig" if self.settings.compiler == "Visual Studio" else "config"]
if not self.options.shared: if not self.options.shared:
self.cpp_info.components["libconfig_c"].defines = ["LIBCONFIG_STATIC"] self.cpp_info.components["libconfig_c"].defines = ["LIBCONFIG_STATIC"]
self.cpp_info.components["libconfig_c"].names["cmake_find_package"] = ["libconfig"] self.cpp_info.components["libconfig_c"].names["cmake_find_package"] = ["libconfig"]
self.cpp_info.components["libconfig_c"].names["cmake_find_package_multi"] = ["libconfig"] self.cpp_info.components["libconfig_c"].names["cmake_find_package_multi"] = ["libconfig"]
self.cpp_info.components["libconfig_c"].names["pkg_config"] = "libconfig" self.cpp_info.components["libconfig_c"].names["pkg_config"] = "libconfig"
self.cpp_info.components["libconfig_cpp"].libs = ["libconfig++"] self.cpp_info.components["libconfig_cpp"].libs = ["libconfig++" if self.settings.compiler == "Visual Studio" else "config++"]
if not self.options.shared: if not self.options.shared:
self.cpp_info.components["libconfig_cpp"].defines = ["LIBCONFIGXX_STATIC"] self.cpp_info.components["libconfig_cpp"].defines = ["LIBCONFIGXX_STATIC"]
self.cpp_info.components["libconfig_cpp"].names["cmake_find_package"] = ["libconfig++"] self.cpp_info.components["libconfig_cpp"].names["cmake_find_package"] = ["libconfig++"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment