Changeset 19777 for trunk


Ignore:
Timestamp:
10/15/19 16:19:25 (5 years ago)
Author:
tbretz
Message:
ROOT_VERSION must not be a list when evaluated with VERSION_GREATER_EQUAL
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/CMakeLists.txt

    r19775 r19777  
    150150ENDIF()
    151151
     152# Replace separators to make the version consistent
     153# (older version might use the '/')
     154STRING(REPLACE "/" "." ROOT_VERSION ${ROOT_VERSION})
     155
    152156# This happens when root is used from its build directory
     157# Create the version components manually
    153158IF(ROOT_VERSION AND NOT ROOT_VERSION_MAJOR)
    154 # Replace separators (older version might use the '/')
    155 STRING(REPLACE "/" "." ROOT_VERSION ${ROOT_VERSION})
    156 STRING(REPLACE "." ";" ROOT_VERSION ${ROOT_VERSION})
    157 # Split version string
    158 LIST(GET ROOT_VERSION 0 ROOT_VERSION_MAJOR)
    159 LIST(GET ROOT_VERSION 1 ROOT_VERSION_MINOR)
    160 LIST(GET ROOT_VERSION 2 ROOT_VERSION_PATCH)
    161 # Remove trailing 0's
    162 STRING(REGEX REPLACE "0+([0-9]+)" "\\1" ROOT_VERSION_MINOR ${ROOT_VERSION_MINOR})
    163 STRING(REGEX REPLACE "0+([0-9]+)" "\\1" ROOT_VERSION_PATCH ${ROOT_VERSION_PATCH})
     159   # Create a list of components
     160   STRING(REPLACE "." ";" ROOT_VERSION_LIST ${ROOT_VERSION})
     161   # Split version string
     162   LIST(GET ROOT_VERSION_LIST 0 ROOT_VERSION_MAJOR)
     163   LIST(GET ROOT_VERSION_LIST 1 ROOT_VERSION_MINOR)
     164   LIST(GET ROOT_VERSION_LIST 2 ROOT_VERSION_PATCH)
     165   # Remove trailing 0's
     166   STRING(REGEX REPLACE "0+([0-9]+)" "\\1" ROOT_VERSION_MINOR ${ROOT_VERSION_MINOR})
     167   STRING(REGEX REPLACE "0+([0-9]+)" "\\1" ROOT_VERSION_PATCH ${ROOT_VERSION_PATCH})
    164168ENDIF()
    165169
Note: See TracChangeset for help on using the changeset viewer.