$NetBSD$

Don't download entityx. Use the pkgsrc version.

--- CMakeLists.txt.orig	2022-05-29 11:42:06.000000000 +0000
+++ CMakeLists.txt
@@ -24,17 +24,17 @@ option(BUILD_TESTS "Build tests" OFF)
 # Dependencies
 ###############################################################################
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
 include("${CMAKE_SOURCE_DIR}/cmake/rigel.cmake")
 
 # This catches the most common case, where none of the submodules have been
 # initialized. It's still possible to get in a state where entityx is present
 # but other submodules are not, but that's unlikely to happen to someone who
 # has just cloned the repo and wants to build for the first time.
-if(NOT EXISTS "${CMAKE_SOURCE_DIR}/3rd_party/entityx/entityx/Entity.h")
-    message(FATAL_ERROR
-        "It seems git submodules were not initialized. You need to run git submodule update --init --recursive, and then re-run CMake.")
-endif()
+#if(NOT EXISTS "${CMAKE_SOURCE_DIR}/3rd_party/entityx/entityx/Entity.h")
+#    message(FATAL_ERROR
+#        "It seems git submodules were not initialized. You need to run git submodule update --init --recursive, and then re-run CMake.")
+#endif()
 
 
 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Emscripten")
@@ -57,6 +57,8 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Emsc
 else()
     find_package(SDL2 REQUIRED)
     find_package(SDL2_mixer REQUIRED)
+    find_package(PkgConfig REQUIRED)
+    pkg_check_modules(ENTITYX entityx REQUIRED)
 endif()
 
 find_package(Filesystem REQUIRED COMPONENTS Final)
