diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a4ede650..5854dbef 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,6 +17,9 @@ set(protobuf_SRCS FingerprintProtocol.pb-c.c ) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/version.h.in + ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY) + set(signal_protocol_SRCS vpool.c vpool.h @@ -59,6 +62,7 @@ set(signal_protocol_SRCS fingerprint.h device_consistency.c device_consistency.h + version.h ) add_subdirectory(curve25519) @@ -100,6 +104,7 @@ INSTALL( group_cipher.h fingerprint.h device_consistency.h + ${CMAKE_CURRENT_BINARY_DIR}/version.h DESTINATION ${INCLUDE_INSTALL_DIR}/signal ) diff --git a/src/version.h.in b/src/version.h.in new file mode 100644 index 00000000..e46c9ae6 --- /dev/null +++ b/src/version.h.in @@ -0,0 +1,6 @@ +#ifndef SIGNAL_VERSION_H +#define SIGNAL_VERSION_H + +#cmakedefine SIGNAL_PROTOCOL_C_VERSION "@SIGNAL_PROTOCOL_C_VERSION@" + +#endif /* SIGNAL_VERSION_H */