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/config.hxx | |
parent | c020bda61fe4a8108772309561d1f8e2f089aec0 (diff) |
Turn libodb-qt repository into package for muti-package repositorylibodb-qt
Diffstat (limited to 'libodb-qt/odb/qt/details/config.hxx')
-rw-r--r-- | libodb-qt/odb/qt/details/config.hxx | 38 |
1 files changed, 38 insertions, 0 deletions
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 |