blob: e9c4b9a34eebdd24482e96dda3655619716ed9ce [file] [log] [blame]
Import("*")
PartName("static")
# we need to pass the headers
build.DependsOn([ Component("libswoc", requires=REQ.HEADERS(internal=False)) ])
@build
def config(env):
env.AppendUnique(
CCFLAGS=['-std=c++17', '-fPIC'],
CPPPATH=['include'],
)
@build.ApplyIf(env['CC'] == 'icc')
def config(env):
env.AppendUnique(
CCFLAGS=[
'-diag-warning=308',
]
)
@build
def source(env):
src_files = env.get("src_files")
# build the library
out = env.StaticLibrary("${PART_ROOT_NAME}-static-${PART_VERSION}", src_files, LIBPREFIX="")
env.InstallLib(out)
# Export the package config.
sdk_pc_file = env.Substfile("libswoc.static.pc", "libswoc.static.pc.in"
, SUBST_DICT = {
"pkg_prefix": env.Dir("$SDK_ROOT").abspath
, "pkg_version": "$PART_VERSION"
})
pc_file = env.Substfile("_install_/libswoc.static.pc", "libswoc.static.pc.in"
, SUBST_DICT = {
"pkg_prefix": env.Dir("$INSTALL_ROOT").abspath
, "pkg_version": "$PART_VERSION"
})
env.SdkPkgConfig(sdk_pc_file)
env.InstallPkgConfig(pc_file,create_sdk=False)