From 216e51619263464d284beded987cde40261002c5 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Fri, 24 Jul 2026 00:13:25 +0300 Subject: [PATCH] build: use explicit file list for liblmdb in CMake instead of GLOB file(GLOB) + regex FILTER didn't work reliably on Windows. Replace with explicit listing of mdb.c + midl.c (same as autotools). --- tools/chatgui/libutun/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/chatgui/libutun/CMakeLists.txt b/tools/chatgui/libutun/CMakeLists.txt index d81e7f0b..2daf4c7f 100644 --- a/tools/chatgui/libutun/CMakeLists.txt +++ b/tools/chatgui/libutun/CMakeLists.txt @@ -8,8 +8,12 @@ set(TRANSPORT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../transport) # libuasync — low-level runtime library # ============================================================================ -file(GLOB UASYNC_SOURCES "${LIB_DIR}/*.c" "${LIB_DIR}/liblmdb/*.c") -list(FILTER UASYNC_SOURCES EXCLUDE REGEX "/lmdb/(mtest[0-9]*\\.c|mtest\\.c|mdb_copy\\.c|mdb_dump\\.c|mdb_load\\.c|mdb_stat\\.c|mplay\\.c)$") +file(GLOB UASYNC_SOURCES "${LIB_DIR}/*.c") +set(UASYNC_LMDB_SOURCES + "${LIB_DIR}/liblmdb/mdb.c" + "${LIB_DIR}/liblmdb/midl.c" +) +list(APPEND UASYNC_SOURCES ${UASYNC_LMDB_SOURCES}) add_library(uasync STATIC ${UASYNC_SOURCES})