Mercurial > hg > orthanc
diff Resources/CMake/OrthancFrameworkConfiguration.cmake @ 2996:d547f998c947 db-changes
integration mainline->db-changes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 10 Dec 2018 20:33:13 +0100 |
parents | 9cc3d40e389b |
children | ab46e537f92e |
line wrap: on
line diff
--- a/Resources/CMake/OrthancFrameworkConfiguration.cmake Thu Dec 06 15:58:08 2018 +0100 +++ b/Resources/CMake/OrthancFrameworkConfiguration.cmake Mon Dec 10 20:33:13 2018 +0100 @@ -562,6 +562,34 @@ endif() + +##################################################################### +## Configuration of Orthanc versioning macros (new in Orthanc 1.5.0) +##################################################################### + +if (ORTHANC_VERSION STREQUAL "mainline") + set(ORTHANC_VERSION_MAJOR "999") + set(ORTHANC_VERSION_MINOR "999") + set(ORTHANC_VERSION_REVISION "999") +else() + string(REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)$" "\\1" ORTHANC_VERSION_MAJOR ${ORTHANC_VERSION}) + string(REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)$" "\\2" ORTHANC_VERSION_MINOR ${ORTHANC_VERSION}) + string(REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)$" "\\3" ORTHANC_VERSION_REVISION ${ORTHANC_VERSION}) + + if (NOT ORTHANC_VERSION STREQUAL + "${ORTHANC_VERSION_MAJOR}.${ORTHANC_VERSION_MINOR}.${ORTHANC_VERSION_REVISION}") + message(FATAL_ERROR "Error in the (x.y.z) format of the Orthanc version: ${ORTHANC_VERSION}") + endif() +endif() + +add_definitions( + -DORTHANC_VERSION_MAJOR=${ORTHANC_VERSION_MAJOR} + -DORTHANC_VERSION_MINOR=${ORTHANC_VERSION_MINOR} + -DORTHANC_VERSION_REVISION=${ORTHANC_VERSION_REVISION} + ) + + + ##################################################################### ## Gathering of all the source code #####################################################################