From a565cea8e93db0bb73f34ef27b693fd2abe56760 Mon Sep 17 00:00:00 2001 From: Fabrice de Gans Date: Mon, 18 Mar 2024 16:29:46 -0700 Subject: [PATCH] [Build] Remove the OpenGL check This is no longer necessary with modern CMake. --- src/wx/CMakeLists.txt | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index 23da006d..5f391379 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -285,8 +285,8 @@ if(VBAM_STATIC) endif() find_package(wxWidgets COMPONENTS xrc xml html adv net core base gl) if(NOT wxWidgets_FOUND) - set(WX_HAS_OPENGL FALSE) find_package(wxWidgets COMPONENTS xrc xml html adv net core base REQUIRED) + target_compile_definitions(visualboyadvance-m PRIVATE NO_OGL) endif() target_link_libraries(visualboyadvance-m ${wxWidgets_LIBRARIES}) @@ -304,23 +304,6 @@ foreach(DEF ${wxWidgets_DEFINITIONS}) list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D${DEF}") endforeach() -# Check for OpenGL. -include(CheckCXXSourceCompiles) -if(NOT DEFINED WX_HAS_OPENGL) - check_cxx_source_compiles(" -#include -#include -#include - -int main(int argc, char** argv) { -wxGLCanvas canvas(NULL, wxID_ANY, NULL, wxPoint(0, 0), wxSize(300, 300), 0); -return 0; -}" WX_HAS_OPENGL) -endif() -if(NOT WX_HAS_OPENGL) - target_compile_definitions(visualboyadvance-m PRIVATE NO_OGL) -endif() - # we make some direct gtk/gdk calls on linux and such # so need to link the gtk that wx was built with if(NOT WIN32 AND NOT APPLE)