mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-29 11:02:20 +08:00
mdbx-build: start using CMake (incomplete; no properly installation for now).
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
project(mdbx_tools)
|
||||
|
||||
set(MDBX_TOOLS
|
||||
mdbx_chk
|
||||
mdbx_copy
|
||||
@@ -9,11 +7,23 @@ set(MDBX_TOOLS
|
||||
)
|
||||
|
||||
foreach (TOOL ${MDBX_TOOLS})
|
||||
add_executable(${TOOL} ${TOOL}.c)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
add_executable(${TOOL} ${TOOL}.c wingetopt.c wingetopt.h)
|
||||
else()
|
||||
add_executable(${TOOL} ${TOOL}.c)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${TOOL} mdbx_objects ${CMAKE_THREAD_LIBS_INIT})
|
||||
set_target_properties(${TOOL} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION $<BOOL:${INTERPROCEDURAL_OPTIMIZATION}>)
|
||||
|
||||
target_link_libraries(${TOOL} mdbx)
|
||||
install(TARGETS ${TOOL} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin COMPONENT mdbx)
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${TOOL}.1)
|
||||
install(FILES ${TOOL}.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1 COMPONENT mdbx)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(LIB_MATH)
|
||||
target_link_libraries(mdbx_chk ${LIB_MATH})
|
||||
target_link_libraries(mdbx_stat ${LIB_MATH})
|
||||
endif()
|
||||
|
@@ -20,8 +20,7 @@
|
||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||
#endif /* _MSC_VER (warnings) */
|
||||
|
||||
/* Avoid reference to mdbx_runtime_flags from assert() */
|
||||
#define mdbx_runtime_flags (~0u)
|
||||
#define MDBX_TOOLS /* Avoid using internal mdbx_assert() */
|
||||
#include "../elements/internals.h"
|
||||
|
||||
typedef struct flagbit {
|
||||
|
@@ -20,8 +20,7 @@
|
||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||
#endif /* _MSC_VER (warnings) */
|
||||
|
||||
/* Avoid reference to mdbx_runtime_flags from assert() */
|
||||
#define mdbx_runtime_flags (~0u)
|
||||
#define MDBX_TOOLS /* Avoid using internal mdbx_assert() */
|
||||
#include "../elements/internals.h"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
|
@@ -20,8 +20,7 @@
|
||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||
#endif /* _MSC_VER (warnings) */
|
||||
|
||||
/* Avoid reference to mdbx_runtime_flags from assert() */
|
||||
#define mdbx_runtime_flags (~0u)
|
||||
#define MDBX_TOOLS /* Avoid using internal mdbx_assert() */
|
||||
#include "../elements/internals.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
@@ -20,8 +20,7 @@
|
||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||
#endif /* _MSC_VER (warnings) */
|
||||
|
||||
/* Avoid reference to mdbx_runtime_flags from assert() */
|
||||
#define mdbx_runtime_flags (~0u)
|
||||
#define MDBX_TOOLS /* Avoid using internal mdbx_assert() */
|
||||
#include "../elements/internals.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
@@ -20,8 +20,7 @@
|
||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||
#endif /* _MSC_VER (warnings) */
|
||||
|
||||
/* Avoid reference to mdbx_runtime_flags from assert() */
|
||||
#define mdbx_runtime_flags (~0u)
|
||||
#define MDBX_TOOLS /* Avoid using internal mdbx_assert() */
|
||||
#include "../elements/internals.h"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
|
Reference in New Issue
Block a user