mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
feat: breakpad support for cmake/vcpkg build
This commit is contained in:
parent
b0fb5d2f87
commit
fe2aa0638e
|
@ -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
|
# vcpkg build - only tested on Windows, does not support FFMPEG
|
||||||
option(USE_VCPKG "uses VCPKG for providing dependencies" OFF)
|
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.
|
## Change binary & resources folder to parallel install with original GD.
|
||||||
## This flag should be avoided because it leads to small regressions:
|
## This flag should be avoided because it leads to small regressions:
|
||||||
|
@ -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
|
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)
|
include(FeatureSummary)
|
||||||
|
|
||||||
project(goldendict-ng
|
project(goldendict-ng
|
||||||
|
@ -192,6 +197,10 @@ if (WITH_ZIM)
|
||||||
target_compile_definitions(${GOLDENDICT} PUBLIC MAKE_ZIM_SUPPORT)
|
target_compile_definitions(${GOLDENDICT} PUBLIC MAKE_ZIM_SUPPORT)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (WITH_VCPKG_BREAKPAD)
|
||||||
|
target_compile_definitions(${GOLDENDICT} PUBLIC USE_BREAKPAD)
|
||||||
|
endif ()
|
||||||
|
|
||||||
#### libraries linking && includes for Win or Unix
|
#### libraries linking && includes for Win or Unix
|
||||||
|
|
||||||
if (USE_VCPKG)
|
if (USE_VCPKG)
|
||||||
|
|
|
@ -24,6 +24,11 @@ target_link_libraries(${GOLDENDICT}
|
||||||
ZLIB::ZLIB
|
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)
|
if (WITH_EPWING_SUPPORT)
|
||||||
add_subdirectory(thirdparty/eb EXCLUDE_FROM_ALL)
|
add_subdirectory(thirdparty/eb EXCLUDE_FROM_ALL)
|
||||||
target_include_directories(${GOLDENDICT} PRIVATE
|
target_include_directories(${GOLDENDICT} PRIVATE
|
||||||
|
|
|
@ -91,6 +91,7 @@ Add this to cmake command:
|
||||||
Most `.dll` built by vcpkg will be automatically copied, but the Qt ones won't.
|
Most `.dll` built by vcpkg will be automatically copied, but the Qt ones won't.
|
||||||
|
|
||||||
You can
|
You can
|
||||||
|
|
||||||
* run `cmake --install .` (recommended)
|
* run `cmake --install .` (recommended)
|
||||||
* manually run windeployqt
|
* manually run windeployqt
|
||||||
* add `${Qt's install path}\Qt\6.5.2\msvc2019_64\bin` to your PATH environment variable
|
* add `${Qt's install path}\Qt\6.5.2\msvc2019_64\bin` to your PATH environment variable
|
||||||
|
|
Loading…
Reference in a new issue