Skip to content

Commit

Permalink
feat: breakpad support for cmake/vcpkg build
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying authored and xiaoyifang committed Jul 3, 2024
1 parent b0fb5d2 commit fe2aa06
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ option(USE_SYSTEM_TOML "use system toml++ instead of bundled one" OFF)

# vcpkg build - only tested on Windows, does not support FFMPEG
option(USE_VCPKG "uses VCPKG for providing dependencies" OFF)
option(WITH_VCPKG_BREAKPAD "build with Breakpad support for VCPKG build only" OFF)

## Change binary & resources folder to parallel install with original GD.
## This flag should be avoided because it leads to small regressions:
Expand All @@ -21,6 +22,10 @@ option(USE_ALTERNATIVE_NAME "Force the name goldendict-ng " OFF)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}") # to put staff in the ./cmake folder

if(WITH_VCPKG_BREAKPAD)
list(APPEND VCPKG_MANIFEST_FEATURES "breakpad")
endif()

include(FeatureSummary)

project(goldendict-ng
Expand Down Expand Up @@ -192,6 +197,10 @@ if (WITH_ZIM)
target_compile_definitions(${GOLDENDICT} PUBLIC MAKE_ZIM_SUPPORT)
endif ()

if (WITH_VCPKG_BREAKPAD)
target_compile_definitions(${GOLDENDICT} PUBLIC USE_BREAKPAD)
endif ()

#### libraries linking && includes for Win or Unix

if (USE_VCPKG)
Expand Down
5 changes: 5 additions & 0 deletions cmake/Deps_Vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ target_link_libraries(${GOLDENDICT}
ZLIB::ZLIB
)

if (WITH_VCPKG_BREAKPAD)
find_package(unofficial-breakpad REQUIRED)
target_link_libraries(${GOLDENDICT} PRIVATE unofficial::breakpad::libbreakpad_client)
endif ()

if (WITH_EPWING_SUPPORT)
add_subdirectory(thirdparty/eb EXCLUDE_FROM_ALL)
target_include_directories(${GOLDENDICT} PRIVATE
Expand Down
1 change: 1 addition & 0 deletions website/docs/howto/build_from_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Add this to cmake command:
Most `.dll` built by vcpkg will be automatically copied, but the Qt ones won't.

You can

* run `cmake --install .` (recommended)
* manually run windeployqt
* add `${Qt's install path}\Qt\6.5.2\msvc2019_64\bin` to your PATH environment variable
Expand Down

0 comments on commit fe2aa06

Please sign in to comment.