From 71381d0abc1895fe924b4670d14b4749ad0b0fd6 Mon Sep 17 00:00:00 2001 From: agouby Date: Mon, 30 Oct 2023 10:44:56 +0100 Subject: [PATCH] Next 2 --- conanfile.py | 35 ++++++--------------------- scripts/.install_dependencies.sh.swp | Bin 0 -> 12288 bytes scripts/install_dependencies.sh | 1 - 3 files changed, 8 insertions(+), 28 deletions(-) create mode 100644 scripts/.install_dependencies.sh.swp 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 0000000000000000000000000000000000000000..6a4050e3043a84425277b738330bc41fc01ce610 GIT binary patch literal 12288 zcmeI2&u<$=6vrn;sHIS#zySmjuUo5)p=&zXt?vG>`d1RVn4Wp>D$V% z7+9X&d&@Fg{eCfOg-#GhMaPR`%XJ$z54dM@ujTNl5Owb0O*d%;v;sR;pcl8zWBb?( zqa!8J=b&+b9)E0M$KAD|RzNGD70?Q31+)TM0j+>mKr3+XD-Z`m>?)?QE160?xesl+ zC$IXZ70?Q31+)TM0j+>mKr5gX&OEG|Nqm!|Nnf1 zu|L3V@B_FBu7d?o2YbO^4>R^XxCy=nUxClS4e%kj1}=djcosYXc7bp9G4=)c1iTNb z;AKz%PlKNyV(eW|1iwAV*r(tFa2;F)mp}_#05jlu@C?`w_JI4qF7W$aj1PPc-UBT# z4f0?J{QUr9KZ5VTx8N4|2&{oVSOHbAAN;z9v0uO~a06TeHfVuq@Dex-c7rdW<;P$R zoCiYNr@)gyUs?gJfL1^&@IP08aOKX;%}!5E)EjfNv-QSgb&iRzrkVU$&20Ow`0#IL zLFl&~mzO(~JF`%$HQ?<`wKmmwb#}f^Z!po-G*hGICZp2})!Jlc)$BR0UFkYeJ zSD&Je6>__h8>U4va<%H|#?0*GltGmW8S}Eupd~tVhNc+Uuw0UYV+=y(fIH?JV~~D|URZY%sP(^NNw1m_2*y zY?_F9ky2_FN&;c=T%L)W zxCY!bLvCGU@+ znXiv1>)8}NWo|@QRgqm$k;9X`*;^(*q&e<#E8_VAP4c$Yb7O*A*}9ECY=EZeqHN`b z`VFmcm6XSMxlV;kwHIylnCwqX^-N`jJJh#n#%ZM|C65WlZ9nYNaI$iQTbap?UI$i- zaGc~yh=GM)qD6QgSH6!g;mxIS3|>AqX9BZ49jfQ?@o~znjh0L0kt=!eFmh!eW)m^xaCQ_l-6`)Xq>GRc zV@Cm1J>6Bf7~xbVRKyn691gJ&1IG+o>EPg`80Xa(**;_ZP0OVSTfb?-ram=uZha3O zC{LB{sW8Oiz`@!=8Hn=|YpK`eUK|w+I(}$W?W(yGbf7||Y#$I#agySEK}nP8Q(Sh- zO&s1(#fK9$*76ZZR6Zh8Q$8Y#&Gay&lA(rn(#SKm^_1D}JdkHgt|CV yJ*z8p8OHA623FjW!SY7FSST25aJ3~Ry1o|D3QLof)CN0vpxAW0V$;I!>;D1T^Sk%} literal 0 HcmV?d00001 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