Skip to content

Commit

Permalink
Split part file in to default (shared) and static versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
SolidWallOfCode committed Feb 26, 2020
1 parent a36412f commit 0deb885
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions swoc++/swoc++-static.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import os
Import("*")
PartName("libswoc")
PartVersion("1.0.13")

files = [
"src/ArenaWriter.cc",
"src/bw_format.cc",
"src/bw_ip_format.cc",
"src/Errata.cc",
"src/MemArena.cc",
"src/RBTree.cc",
"src/swoc_file.cc",
"src/swoc_ip.cc",
"src/TextView.cc",
]

env.AppendUnique(
CCFLAGS=['-std=c++17' ],
CPPPATH=["include"],
)

# build the library
out = env.StaticLibrary("libswoc++",files)
env.InstallLib(out)
# export the include directory
env.InstallInclude(
Pattern(src_dir="include/",includes=["*.h"]),
)
pc_file = env.Substfile("libswoc++.pc", "libswoc++.pc.in"
, SUBST_DICT = {
"pkg_prefix": env.Dir("$INSTALL_ROOT").abspath
, "pkg_version": "$PART_VERSION"
})
env.InstallPkgConfig(pc_file)
2 changes: 1 addition & 1 deletion swoc++/swoc++.part
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env.AppendUnique(
)

# build the library
out = env.StaticLibrary("libswoc++",files)
out = env.Library("libswoc++",files)
env.InstallLib(out)
# export the include directory
env.InstallInclude(
Expand Down

0 comments on commit 0deb885

Please sign in to comment.