CMake: Enable building with Cairo renderer on MSW without GTK

This commit is contained in:
Maarten Bent
2022-04-19 18:47:39 +02:00
parent 1d699256b5
commit 24e20d80e3
3 changed files with 96 additions and 0 deletions

View File

@@ -574,6 +574,17 @@ if(wxUSE_GUI)
wx_option_force_value(wxUSE_SPELLCHECK OFF)
endif()
endif()
if(wxUSE_CAIRO AND NOT WXGTK)
find_package(Cairo)
if(NOT CAIRO_FOUND)
message(WARNING "Cairo not found, Cairo renderer won't be available")
wx_option_force_value(wxUSE_CAIRO OFF)
else()
#TODO only if build-in png?
list(FILTER CAIRO_INCLUDE_DIRS EXCLUDE REGEX ".*libpng.*")
endif()
endif()
endif()
# test if precompiled headers are supported using the cotire test project