forked from ufz/ogs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconanfile.py
More file actions
34 lines (28 loc) · 1.28 KB
/
Copy pathconanfile.py
File metadata and controls
34 lines (28 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from conans import ConanFile, CMake
class OpenGeoSysConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
options = {"gui": [True, False]}
default_options = \
"gui=False", \
"Boost:header_only=True", \
"Qt:xmlpatterns=True"
def requirements(self):
self.requires("Boost/[>=1.56.0]@lasote/stable")
self.requires("Eigen3/3.2.9@bilke/stable")
self.requires("VTK/[>=7.1]@bilke/stable")
if self.options.gui:
self.requires("Shapelib/1.3.0@bilke/stable")
self.requires("libgeotiff/1.4.2@bilke/stable")
self.requires("Qt/5.6.2@bilke/testing")
def imports(self):
self.copy(pattern="*.dll", dst="bin", src="bin")
self.copy(pattern="*.dylib*", dst="bin", src="lib")
self.copy(pattern="*.so*", dst="bin", src="lib")
self.copy(pattern="*.framework*", dst="bin", src="lib")
self.copy(pattern="*.dll", dst="bin/platforms", src="plugins/platforms")
self.copy(pattern="*.dylib*", dst="bin/platforms", src="plugins/platforms")
def build(self):
cmake = CMake(self.settings)
self.run('cmake "%s" %s' % (self.conanfile_directory, cmake.command_line))
self.run('cmake --build . %s' % cmake.build_config)