Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breakpad support for cmake/vcpkg build #1628

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading