-- Replace CPM (CMake Package Manager) dependency fetching with direct
-- add_subdirectory calls using submodule sources already provided via
-- GH_TUPLE in the port Makefile.  CPM requires internet access at build
-- time which is not permitted in the ports sandbox.
-- Also set QT_DEFAULT_MAJOR_VERSION=6 and ADS_VERSION to avoid git-based
-- version detection (which fails outside a git repository).
--- thirdparty/CMakeLists.txt.orig	2026-09-21 22:49:51 UTC
+++ thirdparty/CMakeLists.txt
@@ -1,34 +1,13 @@
-include(${CMAKE_SOURCE_DIR}/cmake/CPM.cmake)
-
-CPMAddPackage(
-    NAME ads
-    GITHUB_REPOSITORY githubuser0xFFFF/Qt-Advanced-Docking-System
-    GIT_TAG v5.1.1
-    OPTIONS
-        "BUILD_STATIC ON"
-        "BUILD_EXAMPLES OFF"
-)
-
-CPMAddPackage(
-    NAME QSimpleUpdater
-    GITHUB_REPOSITORY alex-spataru/QSimpleUpdater
-    GIT_TAG c5c136c0f79ca6423b0914a2676ae3d0e3811c5b
-    OPTIONS
-        "QSIMPLE_UPDATER_BUILD_TESTS OFF"
-)
-
 set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication" FORCE)
-CPMAddPackage(
-    NAME SingleApplication
-    GITHUB_REPOSITORY itay-grudev/SingleApplication
-    GIT_TAG v3.5.6
-)
 
-CPMAddPackage(
-    NAME editorconfig_core_qt
-    GITHUB_REPOSITORY editorconfig/editorconfig-core-qt
-    GIT_TAG ab62f0554abf2bbe4d45427b36a8b2f81ca7b4ab
-)
+set(QT_DEFAULT_MAJOR_VERSION 6 CACHE STRING "Qt version to use" FORCE)
+set(ADS_VERSION 4.4.1)
+set(BUILD_STATIC ON)
+set(BUILD_EXAMPLES OFF)
+add_subdirectory(${CMAKE_SOURCE_DIR}/src/ads ${CMAKE_BINARY_DIR}/src/ads EXCLUDE_FROM_ALL)
+add_subdirectory(${CMAKE_SOURCE_DIR}/src/singleapplication ${CMAKE_BINARY_DIR}/src/singleapplication)
+add_subdirectory(${CMAKE_SOURCE_DIR}/src/QSimpleUpdater ${CMAKE_BINARY_DIR}/src/QSimpleUpdater)
+add_subdirectory(${CMAKE_SOURCE_DIR}/src/editorconfig-core-qt ${CMAKE_BINARY_DIR}/src/editorconfig-core-qt)
 
 add_subdirectory(lua)
 add_subdirectory(scintilla)
