$NetBSD$

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

Define additional macro to OpenGL ES builds.

Drop boost_system component, dropped upstream, from:
https://github.com/prusa3d/PrusaSlicer/issues/14899

--- CMakeLists.txt.orig	2025-11-06 09:19:38.000000000 +0000
+++ CMakeLists.txt
@@ -52,7 +52,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)
 
@@ -111,6 +111,7 @@ endif ()
 
 if (SLIC3R_OPENGL_ES)
     add_definitions(-DSLIC3R_OPENGL_ES)
+    add_definitions(-DENABLE_OPENGL_ES)
 endif()
 
 if(SLIC3R_DESKTOP_INTEGRATION)
@@ -370,10 +371,11 @@ endif()
 # boost::process was introduced first in version 1.64.0,
 # boost::beast::detail::base64 was introduced first in version 1.66.0
 set(MINIMUM_BOOST_VERSION "1.83.0")
-set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams;nowide")
+set(_boost_components "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)
