AusweisApp2/src/config.h.in

46 lines
1007 B
C
Raw Normal View History

2017-12-20 14:54:05 +01:00
/* DO NOT TOUCH THIS MANUALLY */
2019-01-03 15:06:22 +01:00
#cmakedefine ANDROID_BUILD_AAR
2017-12-20 14:54:05 +01:00
#define PRODUCT "@PRODUCT@"
#define VENDOR "@VENDOR@"
#define VENDOR_DOMAIN "@VENDOR_DOMAIN@"
#define VERSION "@VERSION@"
#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define VERSION_MINOR @PROJECT_VERSION_MINOR@
#define VERSION_PATCH @PROJECT_VERSION_PATCH@
#define VERSION_TWEAK @PROJECT_VERSION_TWEAK@
2019-09-30 17:22:19 +02:00
#ifndef RC_INVOKED
#if defined(__BASE_FILE__) && __has_include(<string_view>)
#include <string_view>
constexpr bool isPathSeparator(char pChar)
{
return pChar == '/' || pChar == '\\';
}
2017-12-20 14:54:05 +01:00
2019-09-30 17:22:19 +02:00
constexpr const char* stripPath(const char* pPath)
{
auto result = pPath;
for (auto iter = pPath; *iter; ++iter)
2017-12-20 14:54:05 +01:00
{
2019-09-30 17:22:19 +02:00
if (isPathSeparator(*iter) && *(iter + 1))
{
result = iter + 1;
}
2017-12-20 14:54:05 +01:00
}
2019-09-30 17:22:19 +02:00
return result;
}
2017-12-20 14:54:05 +01:00
2019-09-30 17:22:19 +02:00
static_assert(std::string_view(stripPath(__BASE_FILE__)) == "main.cpp", "config.h include is allowed in main.cpp only!");
2017-12-20 14:54:05 +01:00
#endif
2019-09-30 17:22:19 +02:00
#endif // RC_INVOKED
2017-12-20 14:54:05 +01:00
2019-09-30 17:22:19 +02:00
// DO NOT INCLUDE THIS
// Use QCoreApplication or VersionNumber!