diff --git a/conanfile.py b/conanfile.py index 060be8d..c0f9b82 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,4 +1,4 @@ -from conans import ConanFile +from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout import os import re @@ -14,47 +14,28 @@ class PzaCxx(ConanFile): "shared": True, "build_examples": True } - generators = "CMakeDeps", "CMakeToolchain", "virtualrunenv" - exports_sources = "CMakeLists.txt", "source/*", "version.h.in", "CHANGELOG.md", "test/*", "cmake/*", "examples/*", "LICENSE" def requirements(self): self.requires("paho-mqtt-cpp/[>=1.2.0]") - self.requires("spdlog/[>=1.11.0]") + self.requires("spdlog/[>=1.12.0]") self.requires("nlohmann_json/[>=3.11.2]") self.requires("magic_enum/[>=0.9.2]") if self.settings.os == "Linux": - self.requires("gtest/cci.20210126") - self.requires("cppcheck/[>=2.10]") + self.requires("gtest/[>=1.14.0]") + self.requires("cppcheck/[>=2.12.1]") def layout(self): cmake_layout(self, build_folder=os.getcwd()) def configure(self): - self.options["*"].shared = self.options.shared + self.options["paho-mqtt-cpp"].shared = self.options.shared + self.options["spdlog"].shared = self.options.shared + self.options["nlohmann_json"].shared = self.options.shared + self.options["magic_enum"].shared = self.options.shared def generate(self): tc = CMakeToolchain(self) - tc.variables["BUILD_EXAMPLES"] = self.options.build_examples tc.filename = "pzacxx_toolchain.cmake" tc.generate() deps = CMakeDeps(self) deps.generate() - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - cmake = CMake(self) - cmake.install() - - def imports(self): - if self.settings.os == "Windows" and self.options.shared: - folder = f"{self.build_folder}/bin" - self.copy("*.dll", dst=folder, src="bin") - mingw_dlls = ["libgcc_s_seh-1.dll", "libwinpthread-1.dll", "libstdc++-6.dll"] - mingw_dll_path = "/usr/x86_64-w64-mingw32/bin" - for dll in mingw_dlls: - self.copy(dll, dst=folder, src=mingw_dll_path) - diff --git a/scripts/.install_dependencies.sh.swp b/scripts/.install_dependencies.sh.swp new file mode 100644 index 0000000..6a4050e Binary files /dev/null and b/scripts/.install_dependencies.sh.swp differ diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh index ad273dc..e52a6e4 100755 --- a/scripts/install_dependencies.sh +++ b/scripts/install_dependencies.sh @@ -81,5 +81,4 @@ conan install \ --build=missing \ --profile:b $FULL_PROFILE_BUILD \ --profile:h $FULL_PROFILE_HOST \ - --install-folder=$FULL_BUILD_DIR \ $PROJECT_ROOT_DIR