Skip to content

Commit

Permalink
Merge pull request #94 from heinezen/version
Browse files Browse the repository at this point in the history
Read project version from file
  • Loading branch information
heinezen authored Nov 25, 2021
2 parents 8e618a0 + 66f9b4b commit 0736ae9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ Contact: #sfttech:matrix.org


# nyan library version
set(nyan_VERSION 0.1)
file(STRINGS "nyan_version" version)
list(GET version 0 ver)
set(nyan_VERSION ${ver})

project(nyan VERSION ${nyan_VERSION} LANGUAGES CXX)

Expand Down Expand Up @@ -139,6 +141,12 @@ install(FILES
COMPONENT Devel
)

# Copy nyan version file to build dir
file(COPY
"nyan_version"
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/nyan/"
)


# allow to disable the userpackage registration
# set the variable to off if you include nyan as a submodule!
Expand Down
File renamed without changes.

0 comments on commit 0736ae9

Please sign in to comment.