diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-02-01 20:50:43 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-02-01 20:50:43 +0300 |
commit | 5f1cd97b9727fe10df79e1eb316ff493d9dfc2a9 (patch) | |
tree | 3f0d866222115bd1b42cb538efaac2219ef2afa8 /libodb-qt/odb/qt/details | |
parent | c020bda61fe4a8108772309561d1f8e2f089aec0 (diff) |
Turn libodb-qt repository into package for muti-package repositorylibodb-qt
Diffstat (limited to 'libodb-qt/odb/qt/details')
-rw-r--r-- | libodb-qt/odb/qt/details/build2/config-stub.h | 5 | ||||
-rw-r--r-- | libodb-qt/odb/qt/details/build2/config-vc-stub.h | 5 | ||||
-rw-r--r-- | libodb-qt/odb/qt/details/build2/config-vc.h | 15 | ||||
-rw-r--r-- | libodb-qt/odb/qt/details/build2/config.h | 17 | ||||
-rw-r--r-- | libodb-qt/odb/qt/details/config-vc.h | 5 | ||||
-rw-r--r-- | libodb-qt/odb/qt/details/config.h.in | 12 | ||||
-rw-r--r-- | libodb-qt/odb/qt/details/config.hxx | 38 | ||||
-rw-r--r-- | libodb-qt/odb/qt/details/export.hxx | 78 |
8 files changed, 175 insertions, 0 deletions
diff --git a/libodb-qt/odb/qt/details/build2/config-stub.h b/libodb-qt/odb/qt/details/build2/config-stub.h new file mode 100644 index 0000000..fbb2971 --- /dev/null +++ b/libodb-qt/odb/qt/details/build2/config-stub.h @@ -0,0 +1,5 @@ +/* file : odb/qt/details/build2/config-stub.h + * license : GNU GPL v2; see accompanying LICENSE file + */ + +#include <odb/qt/details/config.h> diff --git a/libodb-qt/odb/qt/details/build2/config-vc-stub.h b/libodb-qt/odb/qt/details/build2/config-vc-stub.h new file mode 100644 index 0000000..e6a412d --- /dev/null +++ b/libodb-qt/odb/qt/details/build2/config-vc-stub.h @@ -0,0 +1,5 @@ +/* file : odb/qt/details/build2/config-vc-stub.h + * license : GNU GPL v2; see accompanying LICENSE file + */ + +#include <odb/qt/details/config-vc.h> diff --git a/libodb-qt/odb/qt/details/build2/config-vc.h b/libodb-qt/odb/qt/details/build2/config-vc.h new file mode 100644 index 0000000..36113ce --- /dev/null +++ b/libodb-qt/odb/qt/details/build2/config-vc.h @@ -0,0 +1,15 @@ +/* file : odb/qt/details/build2/config-vc.h + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* Configuration file for Windows/VC++ for the build2 build. */ + +#ifndef ODB_QT_DETAILS_CONFIG_VC_H +#define ODB_QT_DETAILS_CONFIG_VC_H + +/* Define LIBODB_QT_BUILD2 for the installed case. */ +#ifndef LIBODB_QT_BUILD2 +# define LIBODB_QT_BUILD2 +#endif + +#endif /* ODB_QT_DETAILS_CONFIG_VC_H */ diff --git a/libodb-qt/odb/qt/details/build2/config.h b/libodb-qt/odb/qt/details/build2/config.h new file mode 100644 index 0000000..12d168f --- /dev/null +++ b/libodb-qt/odb/qt/details/build2/config.h @@ -0,0 +1,17 @@ +/* file : odb/qt/details/build2/config.h + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* Static configuration file for the build2 build. The installed case + (when LIBODB_QT_BUILD2 is not necessarily defined) is the only + reason we have it. */ + +#ifndef ODB_QT_DETAILS_CONFIG_H +#define ODB_QT_DETAILS_CONFIG_H + +/* Define LIBODB_QT_BUILD2 for the installed case. */ +#ifndef LIBODB_QT_BUILD2 +# define LIBODB_QT_BUILD2 +#endif + +#endif /* ODB_QT_DETAILS_CONFIG_H */ diff --git a/libodb-qt/odb/qt/details/config-vc.h b/libodb-qt/odb/qt/details/config-vc.h new file mode 100644 index 0000000..6718a07 --- /dev/null +++ b/libodb-qt/odb/qt/details/config-vc.h @@ -0,0 +1,5 @@ +/* file : odb/qt/details/config-vc.h + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* Dummy configuration file for Windows/VC++. */ diff --git a/libodb-qt/odb/qt/details/config.h.in b/libodb-qt/odb/qt/details/config.h.in new file mode 100644 index 0000000..a0c3989 --- /dev/null +++ b/libodb-qt/odb/qt/details/config.h.in @@ -0,0 +1,12 @@ +/* file : odb/qt/details/config.h.in + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* This file is automatically processed by configure. */ + +#ifndef ODB_QT_DETAILS_CONFIG_H +#define ODB_QT_DETAILS_CONFIG_H + +#undef LIBODB_QT_STATIC_LIB + +#endif /* ODB_QT_DETAILS_CONFIG_H */ diff --git a/libodb-qt/odb/qt/details/config.hxx b/libodb-qt/odb/qt/details/config.hxx new file mode 100644 index 0000000..9077380 --- /dev/null +++ b/libodb-qt/odb/qt/details/config.hxx @@ -0,0 +1,38 @@ +// file : odb/qt/details/config.hxx +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_QT_DETAILS_CONFIG_HXX +#define ODB_QT_DETAILS_CONFIG_HXX + +// no pre + +// Qt5 may complain if we are building without -fPIC. Instead of asking the +// user to pass one of these options to the ODB compiler (which can, BTW, be +// done with -x -fPIC, for example, if one is not using the Qt profile), we +// are going to define __PIC__ ourselves just to silence Qt. We also want to +// try to minimize this to cases where it is actually necessary. To achieve +// this, we need to include the Qt config file without including <QtGlobal>, +// which is where the test for PIE is. While newer versions of Qt (from 4.7) +// have <QtConfig>, to support older versions we will include qconfig.h +// directly. This file appears to be present in all the versions starting with +// Qt 4.0. +// +#ifdef ODB_COMPILER +# if defined(__ELF__) && !defined(__PIC__) +# include <QtCore/qconfig.h> // QT_REDUCE_RELOCATIONS +# ifdef QT_REDUCE_RELOCATIONS +# define __PIC__ +# endif +# endif +# define LIBODB_QT_STATIC_LIB +#elif !defined(LIBODB_QT_BUILD2) +# ifdef _MSC_VER +# include <odb/qt/details/config-vc.h> +# else +# include <odb/qt/details/config.h> +# endif +#endif + +// no post + +#endif // ODB_QT_DETAILS_CONFIG_HXX diff --git a/libodb-qt/odb/qt/details/export.hxx b/libodb-qt/odb/qt/details/export.hxx new file mode 100644 index 0000000..4c0097f --- /dev/null +++ b/libodb-qt/odb/qt/details/export.hxx @@ -0,0 +1,78 @@ +// file : odb/qt/details/export.hxx +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_QT_DETAILS_EXPORT_HXX +#define ODB_QT_DETAILS_EXPORT_HXX + +#include <odb/pre.hxx> + +#include <odb/qt/details/config.hxx> + +// Normally we don't export class templates (but do complete specializations), +// inline functions, and classes with only inline member functions. Exporting +// classes that inherit from non-exported/imported bases (e.g., std::string) +// will end up badly. The only known workarounds are to not inherit or to not +// export. Also, MinGW GCC doesn't like seeing non-exported function being +// used before their inline definition. The workaround is to reorder code. In +// the end it's all trial and error. + +#ifdef LIBODB_QT_BUILD2 + +#if defined(LIBODB_QT_STATIC) // Using static. +# define LIBODB_QT_EXPORT +#elif defined(LIBODB_QT_STATIC_BUILD) // Building static. +# define LIBODB_QT_EXPORT +#elif defined(LIBODB_QT_SHARED) // Using shared. +# ifdef _WIN32 +# define LIBODB_QT_EXPORT __declspec(dllimport) +# else +# define LIBODB_QT_EXPORT +# endif +#elif defined(LIBODB_QT_SHARED_BUILD) // Building shared. +# ifdef _WIN32 +# define LIBODB_QT_EXPORT __declspec(dllexport) +# else +# define LIBODB_QT_EXPORT +# endif +#else +// If none of the above macros are defined, then we assume we are being used +// by some third-party build system that cannot/doesn't signal the library +// type. Note that this fallback works for both static and shared but in case +// of shared will be sub-optimal compared to having dllimport. +// +# define LIBODB_QT_EXPORT // Using static or shared. +#endif + +#else // LIBODB_QT_BUILD2 + +#ifdef LIBODB_QT_STATIC_LIB +# define LIBODB_QT_EXPORT +#else +# ifdef _WIN32 +# ifdef _MSC_VER +# ifdef LIBODB_QT_DYNAMIC_LIB +# define LIBODB_QT_EXPORT __declspec(dllexport) +# else +# define LIBODB_QT_EXPORT __declspec(dllimport) +# endif +# else +# ifdef LIBODB_QT_DYNAMIC_LIB +# ifdef DLL_EXPORT +# define LIBODB_QT_EXPORT __declspec(dllexport) +# else +# define LIBODB_QT_EXPORT +# endif +# else +# define LIBODB_QT_EXPORT __declspec(dllimport) +# endif +# endif +# else +# define LIBODB_QT_EXPORT +# endif +#endif + +#endif // LIBODB_QT_BUILD2 + +#include <odb/post.hxx> + +#endif // ODB_QT_DETAILS_EXPORT_HXX |