Skip to content

Commit

Permalink
fmk - adding conanfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Sep 24, 2021
1 parent 729ab4d commit 8d906fd
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from conans import ConanFile, CMake, tools
import os

class OpenSeesDependencies(ConanFile):
name = "OpenSeesDependencies"
version = "1.0.0"
description = "rovides Software Packages needed to build OpenSees"
license = "BSD 3-Clause"
author = "fmk fmckenna@berkeley.edu"
settings = {"os": None, "build_type": None, "compiler": None, "arch": ["x86_64"]}
options = {"shared": [True, False]}
default_options = {"mkl-static:threaded": False, "ipp-static:simcenter_backend": True}
generators = "cmake"
build_policy = "missing"
requires = "libmysqlclient/8.0.25", \
"tcl/8.6.10"
# Custom attributes for Bincrafters recipe conventions
_source_subfolder = "source_subfolder"
_build_subfolder = "build_subfolder"
# Set short paths for Windows
short_paths = True
scm = {
"type": "git", # Use "type": "svn", if local repo is managed using SVN
"subfolder": _source_subfolder,
"url": "auto",
"revision": "auto"
}


def configure(self):
self.options.shared = False

def configure_cmake(self):
cmake = CMake(self)
cmake.configure(source_folder=self._source_subfolder)
return cmake

def build(self):
cmake = self.configure_cmake()
cmake.build()

def package(self):
self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder)
cmake = self.configure_cmake()
cmake.install()
self.copy("*", dst="bin", src=self._source_subfolder + "/applications")

def package_info(self):
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))

0 comments on commit 8d906fd

Please sign in to comment.