mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-28 15:50:17 +08:00
Stop configuring if wxUSE_SECRETSTORE=ON but libsecret not found
This is similar to dd745f1e37 (Error in configure if wxSecretStore
requested but not available, 2025-05-27) but for CMake: allow requesting
wxSecretStore to be available by setting wxUSE_SECRETSTORE=ON explicitly
and failing in this case if libsecret is not found.
This commit is contained in:
@@ -400,6 +400,11 @@ if(UNIX)
|
||||
# have GNOME libsecret under Unix to be able to compile this class.
|
||||
find_package(LIBSECRET)
|
||||
if(NOT LIBSECRET_FOUND)
|
||||
if(wxUSE_SECRETSTORE STREQUAL ON)
|
||||
message(FATAL_ERROR "wxSecretStore support requested, but libsecret was not found: either install it or don't set wxUSE_SECRETSTORE to ON")
|
||||
endif()
|
||||
|
||||
# wxUSE_SECRETSTORE must be AUTO, continue with a warning.
|
||||
message(WARNING "libsecret not found, wxSecretStore won't be available")
|
||||
wx_option_force_value(wxUSE_SECRETSTORE OFF)
|
||||
endif()
|
||||
|
||||
@@ -221,7 +221,7 @@ wx_option(wxUSE_GEOMETRY "use geometry class")
|
||||
wx_option(wxUSE_LOG "use logging system")
|
||||
wx_option(wxUSE_MIMETYPE "use wxMimeTypesManager")
|
||||
wx_option(wxUSE_PRINTF_POS_PARAMS "use wxVsnprintf() which supports positional parameters")
|
||||
wx_option(wxUSE_SECRETSTORE "use wxSecretStore class")
|
||||
wx_option_auto(wxUSE_SECRETSTORE "use wxSecretStore class")
|
||||
wx_option(wxUSE_SNGLINST_CHECKER "use wxSingleInstanceChecker class")
|
||||
wx_option(wxUSE_SOUND "use wxSound class")
|
||||
wx_option(wxUSE_SPELLCHECK "enable spell checking in wxTextCtrl")
|
||||
|
||||
Reference in New Issue
Block a user