conan-recipes/SystemC/conanfile.py

41 lines
1.4 KiB
Python
Raw Normal View History

2017-10-27 22:55:33 +02:00
from conans import ConanFile, CMake
class SystemCConan(ConanFile):
2017-10-27 22:55:33 +02:00
name = "SystemC"
2019-06-15 22:31:04 +02:00
version = "2.3.3"
2017-10-27 22:55:33 +02:00
license = "Apache 2.0 License"
2017-10-28 18:07:51 +02:00
url = "https://github.com/Minres/conan-recipes/blob/master/SystemC"
2017-10-27 22:55:33 +02:00
description = "SystemC is a set of C++ classes and macros which provide an event-driven simulation interface (see also discrete event simulation)."
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "stdcxx":[98,11,14]}
default_options = "shared=True","stdcxx=98"
generators = "cmake"
2019-06-15 22:31:04 +02:00
source_subfolder = "systemc-2.3.3"
exports_sources = "systemc-2.3.3/*"
2017-10-27 22:55:33 +02:00
def build(self):
2017-10-28 17:07:33 +02:00
cmake = CMake(self, parallel=True)
cmake.configure(
source_folder=self.source_subfolder,
args=[
"-DBUILD_SHARED_LIBS=ON" if self.options.shared else "-DBUILD_SHARED_LIBS=OFF",
2019-06-15 22:31:04 +02:00
"-DCMAKE_INSTALL_LIBDIR=lib",
'-DCMAKE_CXX_STANDARD=%s' % self.options.stdcxx
]
)
cmake.build()
cmake.install()
2019-06-15 22:31:04 +02:00
def package(self):
pass
# Headers
#self.copy(pattern="*.h", dst="include", src="package/include", keep_path=True)
# Libs
#self.copy(pattern="*", dst="lib", src="package/lib", keep_path=False)
2017-10-27 22:55:33 +02:00
def package_info(self):
self.cpp_info.libs = ["systemc", "pthread"]
2017-10-27 22:55:33 +02:00