From 19c544441b66292eee29d0d497eec67420815514 Mon Sep 17 00:00:00 2001 From: JackCarterSmith Date: Sun, 22 Sep 2024 15:39:05 +0200 Subject: [PATCH] Conan asspain --- Jenkinsfile | 4 ++-- conanfile.py | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c3ce080..7bb2d8e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { dir("linux") { checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Texture'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Texture.git']]]) sh 'git submodule update --init --recursive' - sh 'conan install . -of build -s build_type=Release -o tools=True -pr:h=default -pr:b=default --build=missing' + sh 'conan install . -of build -s build_type=Release -o "&:tools=True" -pr:b=default -pr:h=default --build=missing' cmakeBuild buildDir: 'build', cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DRSPTEXTURE_SHARED=ON -DRSPTEXTURE_STATIC=OFF -DBUILD_TOOLS=ON -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release', installation: 'latest', steps: [[args: 'all']] } }, @@ -29,7 +29,7 @@ pipeline { dir("windows") { checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Terrain'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Texture.git']]]) sh 'git submodule update --init --recursive' - sh 'conan install . -of build -s build_type=Release -o tools=True -pr:b=default -pr:h=windows --build=missing' + sh 'conan install . -of build -s build_type=Release -o "&:tools=True" -pr:b=default -pr:h=windows --build=missing' cmakeBuild buildDir: 'build', cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DRSPTEXTURE_SHARED=ON -DRSPTEXTURE_STATIC=OFF -DBUILD_TOOLS=ON -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres', installation: 'latest', steps: [[args: 'all']] } } diff --git a/conanfile.py b/conanfile.py index d4de0e6..3ea8f0c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -84,13 +84,14 @@ class rse_texture(ConanFile): #cmdeps.generate() for dep in self.dependencies.values(): - if self.settings.os == "Windows": - if self._is_msvc: - copy(self, "*.dll", dep.cpp_info.bindirs[0], os.path.join(self.build_folder, "bin", str(self.settings.build_type))) + if len(dep.cpp_info.bindirs) > 0: + if self.settings.os == "Windows": + if self._is_msvc: + copy(self, "*.dll", dep.cpp_info.bindirs[0], os.path.join(self.build_folder, "bin", str(self.settings.build_type))) + else: + copy(self, "*.dll", dep.cpp_info.bindirs[0], os.path.join(self.build_folder, "bin")) else: - copy(self, "*.dll", dep.cpp_info.bindirs[0], os.path.join(self.build_folder, "bin")) - else: - copy(self, "*.so", dep.cpp_info.bindirs[0], os.path.join(self.build_folder, "bin")) + copy(self, "*.so", dep.cpp_info.bindirs[0], os.path.join(self.build_folder, "bin")) def build(self): cmbuilder = CMake(self)