mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Fix static build
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
LIB_GRAPHICS_PRI_PATH=$$PWD/../..
|
||||
LIB_3DPARTY_PRI_PATH=$$LIB_GRAPHICS_PRI_PATH/../Common/3dParty/heif/lib
|
||||
|
||||
DEFINES -= UNICODE
|
||||
DEFINES -= _UNICODE
|
||||
@ -12,35 +13,36 @@ DEFINES += \
|
||||
MNG_SUPPORT_WRITE \
|
||||
MNG_ACCESS_CHUNKS \
|
||||
MNG_STORE_CHUNKS\
|
||||
MNG_ERROR_TELLTALE
|
||||
MNG_ERROR_TELLTALE\
|
||||
LIBHEIF_STATIC_BUILD
|
||||
|
||||
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
|
||||
QMAKE_CFLAGS += -Wno-incompatible-function-pointer-types
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
LIBS += -L$$LIB_3DPARTY_PRI_PATH \
|
||||
-lheif \
|
||||
-llibde265 \
|
||||
-lx265-static
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jasper/include \
|
||||
$$LIB_GRAPHICS_PRI_PATH/cximage/jpeg \
|
||||
|
||||
@ -81,11 +81,6 @@ namespace NSHeif {
|
||||
heif_context* ctx = heif_context_alloc();
|
||||
defer(heif_context_free(ctx););
|
||||
|
||||
const heif_plugin_info *inf;
|
||||
|
||||
if (IsError(heif_load_plugin(m_sPluginPath, &inf)))
|
||||
return false;
|
||||
|
||||
heif_encoder* encoder;
|
||||
defer(heif_encoder_release(encoder););
|
||||
|
||||
|
||||
@ -18,12 +18,5 @@ namespace NSHeif {
|
||||
static inline bool IsError(heif_error err);
|
||||
static inline bool Decode(heif_context* ctx, CBgraFrame* frame);
|
||||
static inline NSUnicodeConverter::CUnicodeConverter m_oConverter{};
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
|
||||
static inline const char* m_sPluginPath = "..\\..\\..\\Common\\3dParty\\heif\\libheif\\libheif\\api\\libheif\\libheif\\plugins\\Release\\heif-x265.dll";
|
||||
#elif defined(_LINUX)
|
||||
static inline const char* m_sPluginPath = "../../../Common/3dParty/heif/libheif/libheif/api/libheif/libheif/plugins/libheif-x265.so";
|
||||
#else
|
||||
static inline const char* m_sPluginPath = "../../../Common/3dParty/heif/libheif/libheif/api/libheif/libheif/plugins/libheif-x265.dylib";
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user