Skip to content

Commit faae37a

Browse files
committed
Drop the version qualifier in the CMake pom fallback
Maven passes release.version (2.10.5-SNAPSHOT -> 2.10.5), which is also what LibraryVersion holds. A plain cmake build read the raw pom version instead, so its natives reported 2.10.5-SNAPSHOT from getNativeLibraryVersion() and in the ident and VERSIONINFO, and did not match the jar. Strip the qualifier the same way.
1 parent 5c7c355 commit faae37a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ if(NOT JSSC_VERSION)
172172
if(DETECTED_VERSION STREQUAL "")
173173
message(WARNING "Could not parse JSSC version from pom.xml, defaulting to \"${JSSC_VERSION}\"")
174174
else()
175+
# Drop any qualifier (2.10.5-SNAPSHOT -> 2.10.5) like release.version in pom.xml,
176+
# so getNativeLibraryVersion() matches the Java side's LibraryVersion
177+
string(REGEX REPLACE "-.*$" "" DETECTED_VERSION "${DETECTED_VERSION}")
175178
set(JSSC_VERSION "${DETECTED_VERSION}")
176179
message(STATUS "Found JSSC version \"${JSSC_VERSION}\" in pom.xml")
177180
endif()

0 commit comments

Comments
 (0)