Added (and configure in CMake) a revision.h.in containing the version number

This commit is contained in:
Séverin Lemaignan 2015-09-11 14:47:32 +01:00
parent 5effa144ab
commit 99065fcdc0
2 changed files with 9 additions and 0 deletions

View File

@ -438,6 +438,9 @@ if (NOT TARGET dlib)
# overwrite config.h with the configured one
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/dlib)
configure_file(${CMAKE_SOURCE_DIR}/../dlib/revision.h.in ${CMAKE_CURRENT_BINARY_DIR}/revision.h)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/revision.h DESTINATION include/dlib)
install(FILES "LICENSE.txt" DESTINATION share/doc/dlib)
endif()

6
dlib/revision.h.in Normal file
View File

@ -0,0 +1,6 @@
#ifndef DLIB_REVISION_H
#define DLIB_MAJOR_VERSION @CPACK_PACKAGE_VERSION_MAJOR@
#define DLIB_MINOR_VERSION @CPACK_PACKAGE_VERSION_MINOR@
#define DLIB_PATCH_VERSION @CPACK_PACKAGE_VERSION_PATCH@
#endif