build: exclude LMDB utilities from Windows CMake build, guard POSIX includes in mplay.c

file(GLOB) in libutun/CMakeLists.txt picked up mplay.c, mdb_dump.c and other
standalone LMDB tools that are not library code and fail on Windows. Filter them
out, keep only mdb.c + midl.c.
This commit is contained in:
Evgeny committed 2026-07-23 23:58:39 +03:00
1 parent 86d227bffe
commit e5dd41e5b2
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -9,6 +9,7 @@ set(TRANSPORT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../transport)
# ============================================================================
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)$")
add_library(uasync STATIC ${UASYNC_SOURCES})