Skip to content

Commit

Permalink
Use Conan system requirements to install open gl dependencies on ubun…
Browse files Browse the repository at this point in the history
…tu (Twon#297)

* Use conan systemm requirements to install open gl dependencies on ubuntu

* Only install system opengl dependencies when the open gl render system is required
  • Loading branch information
Twon authored May 6, 2024
1 parent 5cd0e41 commit d33ad93
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,6 @@ jobs:
with:
xcode-version: '${{matrix.settings.compiler.version}}'

- name: Install Linux System Packages
if: contains( matrix.settings.os, 'ubuntu')
run: |
sudo apt-get -y install libgl-dev
sudo apt-get -y install libopengl-dev
sudo apt-get -y install libglu1-mesa-dev
- name: Set up Python
uses: actions/[email protected]
with:
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,6 @@ jobs:
sudo apt-get install libdatetime-perl
- name: Install Linux System Packages
shell: bash
run: |
sudo apt-get -y install libgl-dev
sudo apt-get -y install libopengl-dev
sudo apt-get -y install libglu1-mesa-dev
- name: Set up Python
uses: actions/[email protected]
with:
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ jobs:
version: ${{ env.COMPILER_VERSION }}
platform: x64

- name: Install Linux System Packages
shell: bash
run: |
sudo apt-get -y install libgl-dev
sudo apt-get -y install libopengl-dev
sudo apt-get -y install libglu1-mesa-dev
- name: Set up Python
uses: actions/[email protected]
with:
Expand Down
6 changes: 6 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from conan.tools.files import copy
from conan.tools.scm import Version
from conan.tools.files import load
from conan.tools.system.package_manager import Apt
import re, os.path
import subprocess
import sys
Expand Down Expand Up @@ -174,6 +175,11 @@ def requirements(self):
if self.useFMT:
self.requires("fmt/10.2.1")

def system_requirements(self):
if self.options.get_safe("with_rs_opengl", False):
apt = Apt(self)
apt.install(["libgl-dev", "libopengl-dev", "libglu1-mesa-dev"], update=True, check=True)

# @property
# def _source_subfolder(self):
# return "source_subfolder"
Expand Down

0 comments on commit d33ad93

Please sign in to comment.