| Import("*") |
| PartName("shared") |
| |
| # 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'], |
| 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.SharedLibrary("${PART_ROOT_NAME}-${PART_VERSION}", src_files,SHLIBPREFIX="") |
| env.InstallLib(out) |
| |
| # Export the package config. |
| sdk_pc_file = env.Substfile("libswoc.pc", "libswoc.pc.in", SUBST_DICT={ |
| "pkg_prefix": env.Dir("$SDK_ROOT").abspath, "pkg_version": "$PART_VERSION" |
| }) |
| |
| pc_file = env.Substfile("_install_/libswoc.pc", "libswoc.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) |