You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

9 regels
285 B

  1. file(READ "${CMAKE_CURRENT_LIST_DIR}/../version.h" ver)
  2. string(REGEX MATCH "VERSION_MAJOR ([0-9]*)" _ ${ver})
  3. set(VERSION_MAJOR ${CMAKE_MATCH_1})
  4. string(REGEX MATCH "VERSION_MINOR ([0-9]*)" _ ${ver})
  5. set(VERSION_MINOR ${CMAKE_MATCH_1})
  6. set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR})