$NetBSD$

* use pkgsrc cxxopts

--- CMakeLists.txt.orig	2023-09-01 02:44:10.000000000 +0000
+++ CMakeLists.txt
@@ -94,7 +94,7 @@ include(CMakeFindDependencyMacro)
 
 # Add cmake script directory.
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
-set(CMAKE_MODULE_PATH "${EXTERNAL_DIR}/sanitizers-cmake/cmake"
+set (CMAKE_MODULE_PATH "/Users/bsiegert/pkgsrc/wip/et/work/.buildlink/cmake-Modules" "${EXTERNAL_DIR}/sanitizers-cmake/cmake"
   ${CMAKE_MODULE_PATH})
 
 # Required packages
@@ -106,22 +106,18 @@ find_package(Protobuf REQUIRED)
 find_package(ZLIB REQUIRED)
 find_package(Unwind)
 
+find_package(cxxopts CONFIG REQUIRED)
+find_package(nlohmann_json CONFIG REQUIRED)
+
 if(DISABLE_VCPKG)
 add_subdirectory(${EXTERNAL_DIR}/Catch2)
-add_subdirectory(${EXTERNAL_DIR}/cxxopts)
 add_subdirectory(${EXTERNAL_DIR}/cpp-httplib)
-add_subdirectory(${EXTERNAL_DIR}/json)
 include_directories(
   ${EXTERNAL_DIR}/cpp-httplib
   ${EXTERNAL_DIR}/simpleini
-  ${EXTERNAL_DIR}/json/include
-  ${EXTERNAL_DIR}/cxxopts/include
 )
 else()
 find_package(Catch2 CONFIG REQUIRED)
-find_package(httplib CONFIG REQUIRED)
-find_package(cxxopts CONFIG REQUIRED)
-find_package(nlohmann_json CONFIG REQUIRED)
 find_path(SIMPLEINI_INCLUDE_DIRS "ConvertUTF.c")
 endif()
 
@@ -182,7 +176,7 @@ if(USE_SENTRY)
   endif()
 endif()
 
-set(CMAKE_MODULE_PATH "${EXTERNAL_DIR}/cotire/CMake"
+set (CMAKE_MODULE_PATH "/Users/bsiegert/pkgsrc/wip/et/work/.buildlink/cmake-Modules" "${EXTERNAL_DIR}/cotire/CMake"
   ${CMAKE_MODULE_PATH})
 include(cotire)
 
@@ -324,12 +318,6 @@ macro(DECORATE_TARGET TARGET_NAME)
   add_sanitizers(${TARGET_NAME})
   set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT
     "src/base/Headers.hpp")
-
-  if(CMAKE_CROSSCOMPILING)
-  # Doesn't work when cross-compiling
-  else()
-    cotire(${TARGET_NAME})
-  endif()
 endmacro()
 
 macro(DECORATE_FUZZER TARGET_NAME)
