Issue #96: PDF4QT crashes when I open PDF

This commit is contained in:
Jakub Melka 2024-01-07 11:41:45 +01:00
parent 843c025010
commit 9bbf4539d1
4 changed files with 22 additions and 1 deletions

View File

@ -104,6 +104,18 @@ option(PDF4QT_INSTALL_TO_USR "Install to usr directory" ON)
if(PDF4QT_LINUX)
set(PDF4QT_INSTALL_LIB_DIR_IMPL lib)
set(PDF4QT_INSTALL_BIN_DIR_IMPL bin)
# Check if VCPKG_OVERLAY_PORTS is set as an environment variable or a CMake argument
if(NOT DEFINED ENV{VCPKG_OVERLAY_PORTS} AND NOT DEFINED VCPKG_OVERLAY_PORTS)
message(WARNING "The VCPKG_OVERLAY_PORTS variable is not set! Application can crash in Open/Save dialog due to incompatible LIBPNG.")
else()
set(VCPKG_OVERLAY_PORTS_VALUE "$ENV{VCPKG_OVERLAY_PORTS}")
if(DEFINED VCPKG_OVERLAY_PORTS)
set(VCPKG_OVERLAY_PORTS_VALUE "${VCPKG_OVERLAY_PORTS}")
endif()
message(STATUS "The VCPKG_OVERLAY_PORTS variable is set to: ${VCPKG_OVERLAY_PORTS_VALUE}")
endif()
else()
set(PDF4QT_INSTALL_LIB_DIR_IMPL bin)
set(PDF4QT_INSTALL_BIN_DIR_IMPL bin)

View File

@ -126,6 +126,8 @@ On Linux, a GCC version >= 8 should work, altough we tested it with GCC 11.
For a debug build, append `-DCMAKE_BUILD_TYPE=Debug`.
It is recommended to set the VCPKG_OVERLAY_PORTS variable to 'PDF4QT/vcpkg/overlays' to prevent crashes due to the incompatible LIBPNG library on some Linux systems.
2.3 Build
cmake --build build
@ -154,7 +156,8 @@ CMake can prepare a Wix project to create a *.msi installer package.
| `PDF4QT_INSTALL_PREPARE_WIX_INSTALLER` | Windows |Prepare .msi installator using Wix installer |
| `PDF4QT_INSTALL_DEPENDENCIES` | Any |Install dependent libraries into installation directory |
| `PDF4QT_INSTALL_QT_DEPENDENCIES` | Any |Install Qt dependent libraries into installation directory|
| `VCPKG_OVERLAY_PORTS` | Linux |Set it to prevent crashes with incompatible libpng library|
Following important variables should be set or checked before any attempt to compile this project:
| Variable | Platform | Description |

View File

@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

View File

@ -0,0 +1,5 @@
{
"name": "libpng",
"version": "1.0.0",
"port-version": 0
}