From c57f6f854ed86c01b4e77e7681300eeb4c9996b4 Mon Sep 17 00:00:00 2001 From: Rustam <16064414+rusq@users.noreply.github.com> Date: Sun, 24 Jul 2022 22:16:56 +1000 Subject: [PATCH] add version string --- CMakeLists.txt | 4 +++- jpegrip.h | 2 ++ main.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6bcd14..acc0081 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,9 +7,11 @@ project ("jpegrip") # Add source to this project's executable. add_executable (jpegrip "main.c" "jpegrip.c" "jpegrip.h" "log.c" "log.h" "jpeg.c" "jpeg.h") +add_executable (jpeghdr "jpeghdr.c" "jpeg.c" "jpeg.h" "log.c" "log.h") if (CMAKE_VERSION VERSION_GREATER 3.12) - set_property(TARGET jpegrip PROPERTY CXX_STANDARD 20) + # set_property(TARGET jpegrip PROPERTY CXX_STANDARD 20) + set_property(TARGET jpegrip PROPERTY C_STANDARD 90) endif() # TODO: Add tests and install targets if needed. diff --git a/jpegrip.h b/jpegrip.h index f53e54c..e4d2850 100644 --- a/jpegrip.h +++ b/jpegrip.h @@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define _JR_JPEGRIP2 #include +#define JPEGRIP_VERSION "v0.3.1" + int rip_jpeg(FILE *hFile); #endif diff --git a/main.c b/main.c index 3e48875..3871922 100644 --- a/main.c +++ b/main.c @@ -78,7 +78,7 @@ int main(int argc, char **argv) { } void usage(const char *me) { - printf("jpegrip - find and extract jpeg files in binary files.\n"); + printf("jpegrip %s - find and extract jpeg files in binary files.\n", JPEGRIP_VERSION); printf("Usage: %s [-v|-vv] \n", me); printf("\t-v\t- verbose mode\n\t-vv\t- very verbose mode\n"); }