$NetBSD$

Use GTK3, since that's how we build wxWidgets.

Define additional macro to OpenGL ES builds.

--- CMakeLists.txt.orig	2024-09-18 13:39:04.000000000 +0000
+++ CMakeLists.txt
@@ -53,7 +53,7 @@ CMAKE_DEPENDENT_OPTION(SLIC3R_DESKTOP_IN
 
 set(OPENVDB_FIND_MODULE_PATH "" CACHE PATH "Path to OpenVDB installation's find modules.")
 
-set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux")
+set(SLIC3R_GTK "3" CACHE STRING "GTK version to use with wxWidgets on Linux")
 
 set(IS_CROSS_COMPILE FALSE)
 
@@ -112,6 +112,7 @@ endif ()
 
 if (SLIC3R_OPENGL_ES)
     add_definitions(-DSLIC3R_OPENGL_ES)
+    add_definitions(-DENABLE_OPENGL_ES)
 endif()
 
 if(SLIC3R_DESKTOP_INTEGRATION)
@@ -374,7 +375,8 @@ set(MINIMUM_BOOST_VERSION "1.66.0")
 set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams;nowide")
 find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components})
 
-find_package(Eigen3 3.3.7 REQUIRED)
+find_package(Eigen3 3.3.7 REQUIRED NO_MODULE)
+include_directories(BEFORE SYSTEM ${EIGEN3_INCLUDE_DIR})
 
 add_library(boost_libs INTERFACE)
 add_library(boost_headeronly INTERFACE)
