mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Fix build
This commit is contained in:
@ -17,23 +17,28 @@ DEFINES += \
|
||||
core_linux {
|
||||
DEFINES += HAVE_UNISTD_H HAVE_FCNTL_H
|
||||
QMAKE_CXXFLAGS += -Wno-narrowing
|
||||
LIBS += -L$$LIB_GRAPHICS_PRI_PATH/../Common/3dParty/heif/libheif/libheif/api/libheif/libheif -lheif
|
||||
}
|
||||
|
||||
core_linux_clang {
|
||||
QMAKE_CFLAGS += -Wno-incompatible-function-pointer-types
|
||||
LIBS += -L$$LIB_GRAPHICS_PRI_PATH/../Common/3dParty/heif/libheif/libheif/api/libheif/libheif -lheif
|
||||
}
|
||||
|
||||
core_mac {
|
||||
DEFINES += HAVE_UNISTD_H HAVE_FCNTL_H
|
||||
LIBS += -L$$LIB_GRAPHICS_PRI_PATH/../Common/3dParty/heif/libheif/libheif/api/libheif/libheif -lheif
|
||||
}
|
||||
|
||||
core_windows {
|
||||
DEFINES += JAS_WIN_MSVC_BUILD NOMINMAX
|
||||
LIBS += -lUser32
|
||||
LIBS += $$LIB_GRAPHICS_PRI_PATH/../Common/3dParty/heif/libheif/libheif/api/libheif/libheif/Release/heif.lib
|
||||
}
|
||||
|
||||
core_android {
|
||||
QMAKE_CFLAGS += -Wno-incompatible-function-pointer-types
|
||||
LIBS += -L$$LIB_GRAPHICS_PRI_PATH/../Common/3dParty/heif/libheif/libheif/api/libheif/libheif/heif.a
|
||||
}
|
||||
|
||||
INCLUDEPATH += \
|
||||
@ -42,8 +47,6 @@ INCLUDEPATH += \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/png \
|
||||
$$LIB_GRAPHICS_PRI_PATH/../Common/3dParty/heif/libheif/libheif/api \
|
||||
|
||||
LIBS += $$LIB_GRAPHICS_PRI_PATH/../Common/3dParty/heif/libheif/libheif/api/libheif/libheif/Release/heif.lib
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/../../graphics/Image.h \
|
||||
$$PWD/../../raster/BgraFrame.h \
|
||||
|
||||
@ -1,6 +1,19 @@
|
||||
#include "heif.h"
|
||||
#include "../../common/File.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
#define CONCAT_IMPL(x, y) x##y
|
||||
#define CONCAT(x, y) CONCAT_IMPL(x, y)
|
||||
#define defer(code) Defer CONCAT(_defer_, __COUNTER__)([&](){code;})
|
||||
|
||||
class Defer {
|
||||
std::function<void()> func;
|
||||
public:
|
||||
explicit Defer(std::function<void()> func) : func(func) {}
|
||||
~Defer() { func(); }
|
||||
};
|
||||
|
||||
namespace NSHeif {
|
||||
bool CHeifFile::isHeif(const std::wstring& fileName)
|
||||
{
|
||||
|
||||
@ -1,20 +1,8 @@
|
||||
#include "../BgraFrame.h"
|
||||
#include "../../Common/3dParty/heif/libheif/libheif/api/libheif/heif.h"
|
||||
#include "../../UnicodeConverter/UnicodeConverter.h"
|
||||
#include <functional>
|
||||
|
||||
namespace NSHeif {
|
||||
#define CONCAT_IMPL(x, y) x##y
|
||||
#define CONCAT(x, y) CONCAT_IMPL(x, y)
|
||||
#define defer(code) Defer CONCAT(_defer_, __COUNTER__)([&](){code;})
|
||||
|
||||
class Defer {
|
||||
std::function<void()> func;
|
||||
public:
|
||||
explicit Defer(std::function<void()> func) : func(func) {}
|
||||
~Defer() { func(); }
|
||||
};
|
||||
|
||||
class GRAPHICS_DECL CHeifFile {
|
||||
private:
|
||||
CHeifFile() = delete;
|
||||
|
||||
Reference in New Issue
Block a user