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:
1 parent
86d227bffe
commit
e5dd41e5b2
2 files changed
+4
-1
No files matched your search
+3
-1
@@ -13,13 +13,15 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#include "lmdb.h"
|
||||
|
||||
|
||||
@@ -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})
|
||||
|
||||
|
||||
Reference in new issue
Block a user