ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvVersion.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // LOCAL
11 #include <CVPlatform.h>
12 
13 // Qt
14 #include <QMainWindow>
15 
16 static QString versionLongStr(bool includeOS, QString verStr) {
17 #if defined(CV_ENV_64)
18  const QString arch("64-bit");
19 #elif defined(CV_ENV_32)
20  const QString arch("32-bit");
21 #else
22  const QString arch("\?\?-bit");
23 #endif
24 
25  if (includeOS) {
26 #if defined(CV_WINDOWS)
27  const QString platform("Windows");
28 #elif defined(CV_MAC_OS)
29  const QString platform("macOS");
30 #elif defined(CV_LINUX)
31  const QString platform("Linux");
32 #else
33  const QString platform("Unknown OS");
34 #endif
35  verStr += QStringLiteral(" [%1 %2]").arg(platform, arch);
36  } else {
37  verStr += QStringLiteral(" [%1]").arg(arch);
38  }
39 
40 #ifdef QT_DEBUG
41  verStr += QStringLiteral(" [DEBUG]");
42 #endif
43 
44  return verStr;
45 };
static QString versionLongStr(bool includeOS, QString verStr)
Definition: ecvVersion.h:16