Skip to content

Commit

Permalink
[shortfin] Get the version number from file (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
marbre authored Nov 8, 2024
1 parent 5b44546 commit 661a800
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion shortfin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
)
endif()

# Get version number from file
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/version_info.json VERSION_JSON_STRING)
string(JSON PACKAGE_VERSION GET ${VERSION_JSON_STRING} package-version)
string(REGEX MATCH "(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*" BASE_VERSION ${PACKAGE_VERSION})

project(
"libshortfin"
VERSION 0.9
VERSION ${BASE_VERSION}
LANGUAGES C CXX)

include(CMakeDependentOption)
Expand Down

0 comments on commit 661a800

Please sign in to comment.