version.cpp -> qpms_version.c

Former-commit-id: 55e00cf38df185b8d94c95cdf2b0155f5cd2e005
This commit is contained in:
Marek Nečada 2019-06-17 17:28:43 +03:00
parent 5a76de1be8
commit c4e617a5b1
1 changed files with 3 additions and 3 deletions

View File

@ -22,13 +22,13 @@ endif()
set(VERSION "const char* GIT_REV=\"${GIT_REV}\";
const char* GIT_BRANCH=\"${GIT_BRANCH}\";")
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp VERSION_)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qpms_version.c)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/qpms_version.c VERSION_)
else()
set(VERSION_ "")
endif()
if (NOT "${VERSION}" STREQUAL "${VERSION_}")
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp "${VERSION}")
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/qpms_version.c "${VERSION}")
endif()