Skip to content

Commit

Permalink
Make cmake read version from version.txt
Browse files Browse the repository at this point in the history
It's easier for tooling.
Makes it ready for release-plz.
Bumped from 2.2.1 to 2.3.0 while we're at it.
  • Loading branch information
iamsergio committed Jan 3, 2025
1 parent ffc8c91 commit aee937a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ project(
LANGUAGES CXX C
)

set(KDDockWidgets_VERSION_MAJOR 2)
set(KDDockWidgets_VERSION_MINOR 2)
set(KDDockWidgets_VERSION_PATCH 1)
set(KDDockWidgets_VERSION ${KDDockWidgets_VERSION_MAJOR}.${KDDockWidgets_VERSION_MINOR}.${KDDockWidgets_VERSION_PATCH})
file(STRINGS version.txt KDDW_VERSION_FILE)
list(GET KDDW_VERSION_FILE 0 KDDockWidgets_VERSION)

string(REPLACE "." ";" KDDW_VERSION_LIST "${KDDockWidgets_VERSION}")
list(GET KDDW_VERSION_LIST 0 KDDockWidgets_VERSION_MAJOR)
list(GET KDDW_VERSION_LIST 1 KDDockWidgets_VERSION_MINOR)
list(GET KDDW_VERSION_LIST 2 KDDockWidgets_VERSION_PATCH)

set(PROJECT_VERSION ${KDDockWidgets_VERSION}) # PROJECT_VERSION is needed by some ECM modules
set(KDDockWidgets_SOVERSION "2.2")

Expand Down
1 change: 1 addition & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ path = [
"README-Wayland.md",
"README-troubleshooting",
"3RDPARTY.md",
"version.txt",
"conan/README.txt",
"python/examples/README.txt",
"python/examples-qt6/README.txt",
Expand Down
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.0

0 comments on commit aee937a

Please sign in to comment.