version.cpp -> qpms_version.c
Former-commit-id: 55e00cf38df185b8d94c95cdf2b0155f5cd2e005
This commit is contained in:
parent
5a76de1be8
commit
c4e617a5b1
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue