From 4561b2cba9d0702cd8bf1f67293703db6d59db74 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 7 Feb 2018 13:35:31 +0100 Subject: [PATCH] GTK3: Display a warning and enable wxGraphicsContext --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 967927fb52..5cb5b9a206 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -508,6 +508,13 @@ find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc R # Include wxWidgets macros. include( ${wxWidgets_USE_FILE} ) +string( FIND "${wxWidgets_LIBRARIES}" "gtk3" GTK3_DETECTED ) +if( NOT ${GTK3_DETECTED} EQUAL -1 ) + message( WARNING "\nwxWidgets library has been built against GTK3, it causes a lot of problems in KiCad" ) + add_definitions( -DUSE_WX_GRAPHICS_CONTEXT ) + add_definitions( -DWXGTK3 ) +endif() + # # Find OpenGL library, required #