[packagechooser] Use the found-directory for AppStream headers
This commit is contained in:
parent
94bc244965
commit
062171a2f0
@ -16,7 +16,6 @@
|
||||
|
||||
#ifdef HAVE_APPSTREAM_VERSION
|
||||
#include "ItemAppStream.h"
|
||||
#include <AppStreamQt/pool.h>
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
|
@ -7,20 +7,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/** @brief Loading items from AppData XML files.
|
||||
/** @brief Loading items from AppStream database.
|
||||
*
|
||||
* Only used if QtXML is found, implements PackageItem::fromAppData().
|
||||
* Only used if AppStreamQt is found, implements PackageItem::fromAppStream().
|
||||
*/
|
||||
#include "PackageModel.h"
|
||||
#include "ItemAppStream.h"
|
||||
|
||||
#include "locale/TranslationsModel.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Variant.h"
|
||||
|
||||
#include <AppStreamQt/image.h>
|
||||
#include <AppStreamQt/pool.h>
|
||||
#include <AppStreamQt/screenshot.h>
|
||||
|
||||
/// @brief Return number of pixels in a size, for < ordering purposes
|
||||
static inline quint64
|
||||
sizeOrder( const QSize& size )
|
||||
|
@ -12,10 +12,28 @@
|
||||
|
||||
#include "PackageModel.h"
|
||||
|
||||
namespace AppStream
|
||||
{
|
||||
class Pool;
|
||||
} // namespace AppStream
|
||||
/*
|
||||
* This weird include mechanism is because an #include line is allowed
|
||||
* to consist of preprocessor-tokens, which are expanded, and then
|
||||
* the #include is *re*processed. But if it starts with < or ", then
|
||||
* preprocessor tokens are not expanded. So we build up a #include <>
|
||||
* style line with a suitable path -- if we are given a value for
|
||||
* HAVE_APPSTREAM_HEADERS, that is the directory that the AppStreamQt
|
||||
* headers live in.
|
||||
*/
|
||||
#define CALAMARES_LT <
|
||||
#define CALAMARES_GT >
|
||||
|
||||
#ifndef HAVE_APPSTREAM_HEADERS
|
||||
#define HAVE_APPSTREAM_HEADERS AppStreamQt
|
||||
#endif
|
||||
|
||||
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/pool.h CALAMARES_GT
|
||||
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/image.h CALAMARES_GT
|
||||
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/screenshot.h CALAMARES_GT
|
||||
|
||||
#undef CALAMARES_LT
|
||||
#undef CALAMARES_GT
|
||||
|
||||
/** @brief Loads an item from AppStream data.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user