Skip to content

Commit

Permalink
Merge branch 'feature/conan-2' into feature/relative-uris
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgensenUlrik committed Apr 23, 2024
2 parents 62471ef + eb50775 commit d363d73
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 58 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/ci-cosim-demo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,13 @@ jobs:
with:
python-version: '3.x'
- name: Install prerequisites
run: pip install conan==1.59
- name: Configure libcxx for Linux
run: |
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
if: runner.os == 'Linux'
run: pip install conan~=2.2.0
- name: Add conan profile
run: conan profile detect --name default --force
- name: Add Conan remote
run: conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
- name: Install Conan deps
run: conan install -s build_type=Release .
run: conan install . --build missing
- name: Download client
uses: actions/download-artifact@v2
with:
Expand Down
33 changes: 33 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from os import path
from conan import ConanFile
from conan.tools.files import copy


class ConanRecipe(ConanFile):
name = "cosim-demo-app"
url = "https://gitlab.sintef.no/open-simulation-platform/cosim-demo-app"
settings = "os", "compiler", "build_type", "arch"
package_type = "application"
generators = "VirtualRunEnv"

def configure(self):
self.options["libcosim/*"].proxyfmu = True

def requirements(self):
self.requires("libcosimc/0.11.0@osp/testing-feature_conan-2")

def generate(self):
for dep in self.dependencies.values():
if dep.ref.name == "libcosimc":
copy(self, "cosim.h", dep.cpp_info.includedirs[0],
path.join(self.build_folder, "include"), keep_path=False)
if dep.ref.name == "proxyfmu":
copy(self, "proxyfmu*", dep.cpp_info.bindirs[0],
path.join(self.build_folder, "dist", "bin"), keep_path=False)
for bindeps in dep.cpp_info.bindirs:
copy(self, "*.dll", bindeps,
path.join(self.build_folder, "dist", "bin"), keep_path=False)

for libdeps in dep.cpp_info.libdirs:
copy(self, "*.so*", libdeps,
path.join(self.build_folder, "dist", "lib"), keep_path=False)
51 changes: 0 additions & 51 deletions conanfile.txt

This file was deleted.

0 comments on commit d363d73

Please sign in to comment.