Skip to content

Commit

Permalink
~ Fix cmake version extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
4lex4 committed Aug 16, 2019
1 parent 35edee0 commit 2efcbcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ if ("${VERSION_QUAD}" STREQUAL "${version_h_contents}")
message(FATAL_ERROR "Failed to extract VERSION_QUAD from version.h")
endif()
configure_file(version.h.in "${CMAKE_BINARY_DIR}/version.h" COPYONLY)
string(REGEX REPLACE "(.*)\\..*\\..*" "\\1" APPLICATION_VERSION_MAJOR "${VERSION}")
string(REGEX REPLACE ".*\\.(.*)\\..*" "\\1" APPLICATION_VERSION_MINOR "${VERSION}")
string(REGEX REPLACE ".*\\..*\\.(.*)" "\\1" APPLICATION_VERSION_PATCH "${VERSION}")
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" APPLICATION_VERSION_MAJOR "${VERSION}")
string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" APPLICATION_VERSION_MINOR "${VERSION}")
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" APPLICATION_VERSION_PATCH "${VERSION}")

set(SCANTAILOR_RESOURCES_DIR "${CMAKE_SOURCE_DIR}/src/resources")
set(SCANTAILOR_TRANSLATIONS_DIR "${CMAKE_SOURCE_DIR}/src/translations")
Expand Down

0 comments on commit 2efcbcb

Please sign in to comment.