Link system libwebp instead of Qt-s.
This commit is contained in:
parent
2440fc9e87
commit
491a7fdbae
2 changed files with 30 additions and 2 deletions
30
external/qt/CMakeLists.txt
vendored
30
external/qt/CMakeLists.txt
vendored
|
|
@ -130,6 +130,7 @@ else()
|
||||||
lib/${qt_lib_prefix}qtlibpng
|
lib/${qt_lib_prefix}qtlibpng
|
||||||
lib/${qt_lib_prefix}qtpcre2
|
lib/${qt_lib_prefix}qtpcre2
|
||||||
)
|
)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(qt_libs_list "")
|
set(qt_libs_list "")
|
||||||
|
|
@ -279,7 +280,30 @@ INTERFACE
|
||||||
$<TARGET_FILE:desktop-app::external_zlib>
|
$<TARGET_FILE:desktop-app::external_zlib>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
if (WIN32)
|
||||||
|
if (build_win64)
|
||||||
|
set(libwebp_release_folder x64)
|
||||||
|
else()
|
||||||
|
set(libwebp_release_folder x86)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(webp_lib_loc ${libs_loc}/libwebp/out/$<IF:$<CONFIG:Debug>,debug,release>-static/${libwebp_release_folder}/lib)
|
||||||
|
|
||||||
|
target_link_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
${webp_lib_loc}/libwebp$<$<CONFIG:Debug>:_debug>.lib
|
||||||
|
${webp_lib_loc}/libwebpdemux$<$<CONFIG:Debug>:_debug>.lib
|
||||||
|
${webp_lib_loc}/libwebpmux$<$<CONFIG:Debug>:_debug>.lib
|
||||||
|
)
|
||||||
|
elseif (APPLE)
|
||||||
|
target_link_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
${libs_loc}/local/lib/libwebp.a
|
||||||
|
${libs_loc}/local/lib/libwebpdemux.a
|
||||||
|
${libs_loc}/local/lib/libwebpmux.a
|
||||||
|
${libs_loc}/local/lib/libsharpyuv.a
|
||||||
|
)
|
||||||
|
elseif (LINUX)
|
||||||
target_include_directories(external_qt SYSTEM
|
target_include_directories(external_qt SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${qt_loc}/mkspecs/linux-g++
|
${qt_loc}/mkspecs/linux-g++
|
||||||
|
|
@ -304,6 +328,10 @@ if (LINUX)
|
||||||
xcb-util
|
xcb-util
|
||||||
xcb-render-util
|
xcb-render-util
|
||||||
xcb-keysyms
|
xcb-keysyms
|
||||||
|
webpmux
|
||||||
|
webpdemux
|
||||||
|
webp
|
||||||
|
sharpyuv
|
||||||
)
|
)
|
||||||
if (TARGET Qt::WaylandClient)
|
if (TARGET Qt::WaylandClient)
|
||||||
target_link_optional_libraries(external_qt
|
target_link_optional_libraries(external_qt
|
||||||
|
|
|
||||||
2
external/qt/package.cmake
vendored
2
external/qt/package.cmake
vendored
|
|
@ -21,7 +21,7 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
set(qt_loc /usr/local/desktop-app/Qt-${qt_version})
|
set(qt_loc /usr/local/desktop-app/Qt-${qt_version})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_PREFIX_PATH ${qt_loc})
|
set(CMAKE_PREFIX_PATH ${qt_loc} ${libs_loc}/local)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED QT_VERSION_MAJOR)
|
if (NOT DEFINED QT_VERSION_MAJOR)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue