Move SOVERSION to global CMakeLists, apply SOVERSION to DLL
So that multiple LTS builds can co-exist.
PiperOrigin-RevId: 639154515
Change-Id: Id34d6fbef823151a4f3c73cf7b9b340257eadd63
diff --git a/create_lts.py b/create_lts.py
index 7e5368e..c20577a 100755
--- a/create_lts.py
+++ b/create_lts.py
@@ -116,20 +116,21 @@
datestamp)
})
ReplaceStringsInFile(
- 'CMakeLists.txt', {
- 'project(absl LANGUAGES CXX)':
+ 'CMakeLists.txt',
+ {
+ 'project(absl LANGUAGES CXX)': (
'project(absl LANGUAGES CXX VERSION {})'.format(datestamp)
- })
- # Set the SOVERSION to YYMM.0.0 - The first 0 means we only have ABI
- # compatible changes, and the second 0 means we can increment it to
- # mark changes as ABI-compatible, for patch releases. Note that we
- # only use the last two digits of the year and the month because the
- # MacOS linker requires the first part of the SOVERSION to fit into
- # 16 bits.
- # https://www.sicpers.info/2013/03/how-to-version-a-mach-o-library/
- ReplaceStringsInFile(
- 'CMake/AbseilHelpers.cmake',
- {'SOVERSION 0': 'SOVERSION "{}.0.0"'.format(datestamp[2:6])})
+ ),
+ # Set the SOVERSION to YYMM.0.0 - The first 0 means we only have ABI
+ # compatible changes, and the second 0 means we can increment it to
+ # mark changes as ABI-compatible, for patch releases. Note that we
+ # only use the last two digits of the year and the month because the
+ # MacOS linker requires the first part of the SOVERSION to fit into
+ # 16 bits.
+ # https://www.sicpers.info/2013/03/how-to-version-a-mach-o-library/
+ 'ABSL_SOVERSION 0': 'ABSL_SOVERSION "{}.0.0"'.format(datestamp[2:6]),
+ },
+ )
StripContentBetweenTags('CMakeLists.txt', '# absl:lts-remove-begin',
'# absl:lts-remove-end')