2018-01-04 09:27:09 +03:00
|
|
|
project(mdbx_tools)
|
|
|
|
|
2018-01-07 15:10:06 +03:00
|
|
|
set(MDBX_TOOLS
|
2018-01-14 22:01:38 +03:00
|
|
|
mdbx_chk
|
|
|
|
mdbx_copy
|
|
|
|
mdbx_dump
|
|
|
|
mdbx_load
|
|
|
|
mdbx_stat
|
|
|
|
)
|
2018-01-07 15:10:06 +03:00
|
|
|
|
2018-01-14 22:01:38 +03:00
|
|
|
foreach (TOOL ${MDBX_TOOLS})
|
|
|
|
add_executable(${TOOL} ${TOOL}.c)
|
2018-01-07 15:10:06 +03:00
|
|
|
|
2018-01-14 22:01:38 +03:00
|
|
|
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()
|