2019-06-15 22:31:04 +02:00
from conans import ConanFile , CMake
2018-02-22 21:36:58 +01:00
class SystemC_CCIConan ( ConanFile ) :
name = " SystemC-CCI "
2019-06-15 22:31:04 +02:00
version = " 1.0.0 "
2018-02-22 21:36:58 +01:00
license = " Apache 2.0 License "
url = " https://github.com/Minres/conan-recipes/blob/master/SystemC-CCI "
description = " The SystemC Configuration, Control and Inspection (CCI) allows tools to seamlessly and consistently interact with models to provide essential capabilities. "
settings = " os " , " compiler " , " build_type " , " arch "
2019-06-15 22:31:04 +02:00
options = { " shared " : [ True , False ] , " stdcxx " : [ 98 , 11 , 14 ] }
default_options = " shared=True " , " stdcxx=98 "
generators = " cmake "
source_subfolder = " cci-1.0.0 "
exports_sources = " cci-1.0.0/* "
requires = " SystemC/2.3.3@minres/stable "
2018-02-22 21:36:58 +01:00
def configure ( self ) :
self . options [ " SystemC " ] . stdcxx = self . options . stdcxx
2019-06-15 22:31:04 +02:00
def build ( self ) :
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 ' ,
' -DCMAKE_INSTALL_LIBDIR=lib ' ,
' -DCMAKE_CXX_STANDARD= %s ' % self . options . stdcxx ,
' -DSYSTEMC_ROOT= %s ' % self . deps_cpp_info [ " SystemC " ] . rootpath
]
)
cmake . build ( )
cmake . install ( )
2018-02-22 21:36:58 +01:00
def package ( self ) :
2019-06-15 22:31:04 +02:00
pass
2018-02-22 21:36:58 +01:00
# Headers
2019-06-15 22:31:04 +02:00
#inc_dir = os.path.join(self.source_subfolder, 'src')
#self.copy(pattern="cci_configuration", dst="include", src=inc_dir, keep_path=True)
#self.copy(pattern="*.h", dst="include", src=inc_dir, keep_path=True)
2018-02-22 21:36:58 +01:00
# Libs
2019-06-15 22:31:04 +02:00
#lib_dir = os.path.join(self.source_subfolder, 'lib')
#self.copy(pattern="*", dst="lib", src=lib_dir, keep_path=False)
2018-02-22 21:36:58 +01:00
def package_info ( self ) :
self . cpp_info . libs = [ " cciapi " ]