Mercurial > hg > orthanc
diff Resources/CMake/OrthancFrameworkConfiguration.cmake @ 2988:9cc3d40e389b
Orthanc 1.4.3 is now known as 1.5.0
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 10 Dec 2018 11:15:31 +0100 |
parents | e62e296a5714 |
children | ab46e537f92e |
line wrap: on
line diff
--- a/Resources/CMake/OrthancFrameworkConfiguration.cmake Mon Dec 10 10:33:58 2018 +0100 +++ b/Resources/CMake/OrthancFrameworkConfiguration.cmake Mon Dec 10 11:15:31 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 #####################################################################