created project with cmake

This commit is contained in:
Luis Stanglmeier 2022-06-23 13:44:39 +02:00
parent c4b3d8ac5f
commit 5f6abf300e
54 changed files with 412 additions and 310 deletions

View file

@ -0,0 +1,28 @@
// define the version string and embed it into the binary
extern "C" const char TSEP_BINARY_VERSION[] = "TSEP_VERSION:" TSEP_VERSION;
#ifdef __linux__
#ifdef TSEP_SHARED_LIBRARY
// if TSEP_SHARED_LIBRARY is defined an entry point for a shared library will be defined
// which will print the binary infromation
#include <stdio.h>
#include <stdlib.h>
extern "C" const char interp_path[] __attribute__((section(".interp"))) = "/lib64/ld-linux-x86-64.so.2";
extern "C" void tsep_version_entry_point()
{
printf(TSEP_PRODUCT_NAME " " TSEP_VERSION "\n");
printf(TSEP_COPYRIGHT "\n");
printf("Compiled by GCC %d.%d", __GNUC__, __GNUC_MINOR__);
#ifdef _DEBUG
printf(" (debug build)");
#endif
printf("\n");
exit(0);
}
#endif
#endif